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

URL parameter name may conflict with other modules #12

Open
TerrapinSoftware opened this issue Sep 30, 2021 · 1 comment
Open

URL parameter name may conflict with other modules #12

TerrapinSoftware opened this issue Sep 30, 2021 · 1 comment

Comments

@TerrapinSoftware
Copy link

Interesting scenario: We chose "code" for the URL parameter name. Unfortunately, if you create a new email template and load an existing template, the POST request uses the same parameter name. This causes an error message "Discount code XXX is invalid", where XXX is the ID code of the loaded template. Of course, because there is no such discount code. Triggered in FrontControllerInterface.php line 227.

Maybe is would be a good idea to limit the detection of URL parameters to GET requests, and to make sure that the area code is not "adminhtml". The short-term remedy is to use a unique name for the URL parameter, which could be a problem.

This was with Magento 2.4.2-p2 and 2.4.3.

@crankycyclops
Copy link
Owner

Interesting case. Thank you for catching it. Lately, I haven't had much time to work on this project, but if you'd like to submit a PR, I'd be happy to merge it in.

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