Skip to content

Commit 1120d23

Browse files
committed
minor #12605 [Security] query string can't be used in security.access_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
2 parents 604e943 + 2877f9b commit 1120d23

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

security/access_control.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ Take the following ``access_control`` entries as an example:
9393
]);
9494
9595
For each incoming request, Symfony will decide which ``access_control``
96-
to use based on the URI, the client's IP address, the incoming host name,
97-
and the request method. Remember, the first rule that matches is used, and
98-
if ``ips``, ``host`` or ``methods`` are not specified for an entry, that
99-
``access_control`` will match any ``ips``, ``host`` or ``methods``:
96+
to use based on the URI (without the ``GET`` parameters), the
97+
client's IP address, the incoming host name, and the request method.
98+
Remember, the first rule that matches is used, and if ``ips``, ``host``
99+
or ``methods`` are not specified for an entry, that ``access_control``
100+
will match any ``ips``, ``host`` or ``methods``:
100101

101102
+-----------------+-------------+-------------+------------+--------------------------------+-------------------------------------------------------------+
102103
| URI | IP | HOST | METHOD | ``access_control`` | Why? |

0 commit comments

Comments
 (0)