Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: populationOption type seems to ignore value #347

Closed
GCHQ77703 opened this issue Aug 26, 2018 · 2 comments
Closed

Bug: populationOption type seems to ignore value #347

GCHQ77703 opened this issue Aug 26, 2018 · 2 comments

Comments

@GCHQ77703
Copy link
Member

Given a configuration object that looks like:

            {
                name: "Signing Algorithm",
                type: "populateOption",
                value: [
                    {
                        name: "HS256",
                        value: "HS256"
                    },
                    {
                        name: "HS384",
                        value: "HS384",
                    },
                    ...

When the user selects from the dropdown one with a name of 'None' but a value of 'none', I still appear to get 'None' back as the value.

PoC of this can be seen in the jwt pull request, changing name: 'none' to name: 'None' appears to break the script, whereas I believe it is likely intended to be only a visual change.

@n1474335
Copy link
Member

I think you're misunderstanding the populateOption argument. If you just want a dropdown of options, use the option type. populateOption is for populating another argument with the value that you select. It should be accompanied by a target field. Take a look at https://github.com/gchq/CyberChef/blob/master/src/core/operations/RegularExpression.mjs for an example.

I wouldn't expect you to actually try to read the value of the populateOption argument itself, but rather the argument that it populates.

@GCHQ77703
Copy link
Member Author

Oh I see, thank-you very much for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants