Problem/Motivation

In Symfony 5.2 is the constant Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL is deprecated. For more info see: https://github.com/symfony/symfony/blob/4537f85963fba75f9ec2aa9a39c04814... and https://github.com/symfony/symfony/blob/5.x/src/Symfony/Component/HttpFo...

Proposed resolution

Replace the usage of the constant. Suggested replacements are to use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.

Remaining tasks

TBD

User interface changes

None

API changes

Data model changes

None

Release notes snippet

The constant Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL is deprecated in Symfony 5.2. While this does not affect Drupal 9 sites, site owners may want to

CommentFileSizeAuthor
#3 3195533-3.patch7.66 KBdaffie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

daffie’s picture

Issue summary: View changes
daffie’s picture

Status: Active » Needs review
FileSize
7.66 KB

Replaced the Request::HEADER_X_FORWARDED_ALL with Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks like a straightforward replacement.

  • catch committed 7e9af0f on 9.2.x
    Issue #3195533 by daffie, longwave: [Symfony 6] The constant Symfony\...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Looks straightforward to me too.

Committed 7e9af0f and pushed to 9.2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

effulgentsia’s picture

Issue tags: +9.2.0 release notes

Do we want to encourage site owners to review and update their $settings['reverse_proxy_trusted_headers'] value? If so, then I think it's worth a release note.

catch’s picture

There's no change for Drupal site owners in 9.2.0 - we haven't updated to Symfony 5.2. Tagging with 10.0.0 release notes instead.