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

[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping#31604

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

@vilius-g
Copy link
Contributor

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

CurrentlyBinaryFileResponse, when configured withX-Accel-Redirect sendfile type, will only substitute file paths specified inX-Accel-Mapping. But if the provided file path does not have a defined prefix, then the resulting header will include absolute path. Nginx expects a valid URI, therefore this will result in an issue that is very hard to detect and debug as it will not show up in error logs and instead the request would just hang for some time and will be re-served without query parameters(?).

…ccel-MappingCurrently BinaryFileResponse, when configured with X-Accel-Redirect sendfile type,will only substitute file paths specified in X-Accel-Mapping. But if the providedfile path does not have a defined prefix, then the resulting header will includethe absolute path. Nginx expects a valid URI, therefore this will result in anissue that is very hard to detect and debug as it will not show up in error logsand instead the request would just hang for some time and then be re-servedwithout query parameters(?).
@fabpot
Copy link
Member

Don't we have the same issue in 3.4?

@vilius-g
Copy link
ContributorAuthor

Don't we have the same issue in 3.4?

Yes, this affects all versions. But fix requires refactor for 3.4.

@fabpot
Copy link
Member

@vilius-g It means that we first need a PR on 3.4. Can you work on one?

@vilius-g
Copy link
ContributorAuthor

vilius-g commentedMay 28, 2019
edited
Loading

OK, I can make this for 3.4.

@fabpot
Copy link
Member

Thank you!

@nicolas-grekas
Copy link
Member

Replaced by#31654

nicolas-grekas added a commit that referenced this pull requestMay 29, 2019
…side of X-Accel-Mapping (vilius-g)This PR was merged into the 3.4 branch.Discussion----------[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |#31604 but refactored for 3.4Commits-------a662f61 [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
@vilius-gvilius-g deleted the fix-x-accel-redirect-mismatch branchMay 29, 2019 12:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas 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

4.2

Development

Successfully merging this pull request may close these issues.

6 participants

@vilius-g@fabpot@nicolas-grekas@Simperfit@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp