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

[HttpFundation][FrameworkBundle] Deprecate the HEADER_X_FORWARDED_ALL constant#38954

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

Merged
fabpot merged 1 commit intosymfony:5.xfromjderusse:deprecat-xforwardedall
Nov 4, 2020

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedNov 1, 2020
edited
Loading

QA
Branch?5.x
Bug fix?no
New feature?no
Deprecations?yes
Tickets-
LicenseMIT
Doc PRTODO

TheHEADER_X_FORWARDED_ALL implicitly trust thex-forwarded-host header, leading to possible host header attack (as warned in thedocumentation.)

Moreover, thisHEADER_X_FORWARDED_ALL does not really fowardsall headers, as ti does not supportsX-Forwarded-Prefix headers.

This PR deprecate the constant and the new framework bundle configuration. It will be removed in 6.0. People have to use: either:

  • Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO);
  • Request::setTrustedProxies(['1.2.3.4'], Request::HEADER_X_FORWARDED_TRAEFIK);
  • framework.trusted_headers: [x-forwarded-for, x-forwarded-host, x-forwarded-port, x-forwarded-proto]

@jderussejderusse added this to the5.x milestoneNov 1, 2020
@jderussejderusseforce-pushed thedeprecat-xforwardedall branch 2 times, most recently from8be58b8 to8a4eb65CompareNovember 1, 2020 21:33
@jderussejderusse changed the titleDeprecate the HEADER_X_FORWARDED_ALL constant[HttpFundation] Deprecate the HEADER_X_FORWARDED_ALL constantNov 2, 2020
@jderussejderusse changed the title[HttpFundation] Deprecate the HEADER_X_FORWARDED_ALL constant[HttpFundation][FrameworkBundle] Deprecate the HEADER_X_FORWARDED_ALL constantNov 2, 2020
@derrabusderrabus modified the milestones:5.x,5.2Nov 2, 2020
@jderussejderusseforce-pushed thedeprecat-xforwardedall branch 4 times, most recently fromea9ff44 tofe344ebCompareNovember 2, 2020 15:57
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(with some remaining nitpicking)

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedNov 2, 2020
edited
Loading

Can you please submit recipe PR to not use the constant in any version?

jderusse reacted with thumbs up emoji

@fabpot
Copy link
Member

Thank you@jderusse.

@fabpotfabpot merged commit6251c4e intosymfony:5.xNov 4, 2020
@jderussejderusse deleted the deprecat-xforwardedall branchNovember 4, 2020 17:44
@fabpotfabpot mentioned this pull requestNov 10, 2020
LukeTowers added a commit to wintercms/storm that referenced this pull requestDec 9, 2021
Refs:-symfony/symfony#37734-symfony/symfony#38954This upgrade causes a breaking change since newly generated config files created from v1.1.4 to v1.1.8 include a default reference to `Illuminate\Http\Request::HTTP_X_FORWARDED_ALL` which no longer exists as of Laravel 9 / Symfony 6 and there is no way for us to replace that class to add it back ourselves without copying the entirety of the class into our project and class_alias()ing it, which would be a bad idea for lots of reasons.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

7 participants

@jderusse@nicolas-grekas@fabpot@dunglas@stof@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp