Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@mpdude
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

While investigating#25373, I found that when thedumpedUrlMatcher 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.

@nicolas-grekas
Copy link
Member

Can you check the failures please?

@mpdude
Copy link
ContributorAuthor

mpdude commentedDec 11, 2017
edited
Loading

fabbot complains about fixtures (src/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher{1,2,3}.php). Won't fix that, as it would also mean having to change the MatcherDumper.

@mpdude
Copy link
ContributorAuthor

Overall, would it be better to applyrawurlencode instead of trying to preserve the URL as- is?

@fabpot
Copy link
Member

Thank you@mpdude.

fabpot added a commit that referenced this pull requestDec 14, 2017
…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
@fabpotfabpot closed thisDec 14, 2017
@fabpot
Copy link
Member

@mpdude Can you have a look at why the tests are broken on 3.4 (https://travis-ci.org/symfony/symfony/jobs/316592496)? Thanks.

@nicolas-grekas
Copy link
Member

Tests fixed in3c67741

This was referencedDec 15, 2017
This was referencedJan 5, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@SimperfitSimperfitSimperfit approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

6 participants

@mpdude@nicolas-grekas@fabpot@Simperfit@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp