-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher #25427
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
Can you check the failures please? |
fabbot complains about fixtures ( |
Overall, would it be better to apply |
Thank you @mpdude. |
…s in the UrlMatcher (mpdude) This PR was squashed before being merged into the 2.7 branch (closes #25427). Discussion ---------- Preserve percent-encoding in URLs when performing redirects in the UrlMatcher | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | While investigating #25373, I found that when the *dumped* `UrlMatcher` performs redirections due to missing trailing slashes on URLs, it does so using an url*de*coded URL. This is wrong, as it may lead to wrong interpretations of URLs upon the next request. For example, think of an URL that contains `%23` in the middle of the path info. Upon redirection, this will be turned into `#` with an obvious effect. Commits ------- 8146510 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
@mpdude Can you have a look at why the tests are broken on 3.4 (https://travis-ci.org/symfony/symfony/jobs/316592496)? Thanks. |
Tests fixed in 3c67741 |
While investigating #25373, I found that when the dumped
UrlMatcher
performs redirections due to missing trailing slashes on URLs, it does so using an urldecoded URL.This is wrong, as it may lead to wrong interpretations of URLs upon the next request. For example, think of an URL that contains
%23
in the middle of the path info. Upon redirection, this will be turned into#
with an obvious effect.