-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Security] query string can't be used in security.access_control > path #12605
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, never thought about this. I definitely agree with adding this! It doesn't hurt and it'll save quite some time for people that think it is possible.
@alexislefebvre I like this proposal ... but I think it's too hidden in the new text. I'd create a separate phrase (or maybe a note?) clearly saying that query parameters are ignored for access_control regexp matches. |
…_control > path (alexislefebvre) This PR was merged into the 3.4 branch. Discussion ---------- [Security] query string can't be used in security.access_control > path Goal: explain that GET parameters are ignored, so the following rule won't work: ``` - { path: ^/foo/bar\?foobar=[0-9]+, roles: [ ROLE_USER ], methods: [ GET ] } ``` Source: https://stackoverflow.com/questions/46600752/symfony-access-control-regex-with-get-parameter Commits ------- 2877f9b access_control.rst: query string is ignored
* 3.4: [#12605] Transformed GET parameter notice to caution access_control.rst: query string is ignored
* 4.3: [#12605] Transformed GET parameter notice to caution access_control.rst: query string is ignored [mercure] compatibility with v0.8 Update doctrine.rst
* 4.4: [#12605] Transformed GET parameter notice to caution access_control.rst: query string is ignored [Console] Update some method names [mercure] compatibility with v0.8 Update doctrine.rst
Thanks @alexislefebvre! I've applied Javier's suggestion of moving this into a more explicit caution in 35b812c |
Thanks a lot @wouterj! |
Goal: explain that GET parameters are ignored, so the following rule won't work:
Source: https://stackoverflow.com/questions/46600752/symfony-access-control-regex-with-get-parameter