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

XSS vulnerability in MenuItemStaticURLType #190

Open
joricksteenstra opened this issue Jan 9, 2024 · 1 comment
Open

XSS vulnerability in MenuItemStaticURLType #190

joricksteenstra opened this issue Jan 9, 2024 · 1 comment

Comments

@joricksteenstra
Copy link

There's a XSS vulnerability in the MenuItemStaticURLType type. Would it be possible to add a validation rule to the MenuItemStaticURLType. So for example add something like: 'starts_with:/,https://,http://'.

@Senexis
Copy link
Contributor

Senexis commented Jan 14, 2024

Don't know if you've figured out a solution already, but this may help if not:

You should just be able to remove the menu type from the config (menu_item_types), create an extended MenuItemStaticURLType class, and then add the rule to the new class's getRules() method. Don't forget to add your new class to the config!

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