Problem/Motivation

The URL for adding a new action requires that you pass a base-64 encoded sha-256 hash of the plugin ID.
No other UI using plugin IDs (blocks, views, fields) does this extra step.

Digging back, the original patch to add the actions module used an md5 hash.
In the docs, it said:

Hashes are used to prevent actual function names from going out into HTML forms and coming back.

This was when the action ID corresponded with an actual PHP function name.

This is no longer true, and is an added complexity that can be removed.

Proposed resolution

Remove Crypt::hashBase64() calls for the action UI.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

StatusFileSize
new5.05 KB

Patch written while discussing with @jibran

tim.plunkett’s picture

Status: Active » Needs review
dawehner’s picture

Such a nice 👏 improvement!

tim.plunkett’s picture

StatusFileSize
new6.14 KB
new2.07 KB

Simplifying this further.

tim.plunkett’s picture

StatusFileSize
new1.54 KB
new6.13 KB

Nitpicking myself. Sorry, I'm done now :)

jibran’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

Sorry, I missed the link in slack. Thanks, for looking into it. Patch looks straightforward and it is green so RTBC.

  • catch committed 19fa2eb on 8.5.x
    Issue #2911806 by tim.plunkett: Remove unnecessary Crypt::hashBase64()...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Nice find.

Committed 19fa2eb and pushed to 8.5.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.