Commit c5ac440
committed
bug symfony#61659 [Security] Fix
This PR was merged into the 6.4 branch.
Discussion
----------
[Security] Fix `HttpUtils::createRequest()` when the base request is forwarded
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#61560
| License | MIT
Currently trusted headers are both copied from the original request **and** used to generate the URI. That means if we have a trusted `/foo` prefix the URI generated for `/bar` would be `/foo/bar`, and the new request URI would be `/foo/foo/bar`.
This PR temporarily distrusts proxies so that the generated URI would be `/bar`, and the new request URI `/foo/bar`.
Commits
-------
b394984 [Security] Fix `HttpUtils::createRequest()` when the base request is forwardedHttpUtils::createRequest() when the base request is forwarded (MatTheCat)File tree
2 files changed
+16
-0
lines changed- src/Symfony/Component/Security/Http
- Tests
2 files changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
236 | 246 | | |
237 | 247 | | |
238 | 248 | | |
| |||
0 commit comments