Review main Abandoned

65550[BUGFIX] Use X-Forwarded-Proto header when checking for HTTPS

Thorben Nissen CR 0 V 0 Easy +7 −1 updated 09/03/20, 20:49

Commit message

Change how TYPO3 determines, if HTTPS is active or not, when used behind
a reverse proxy.

When '''reverseProxySSL''' setting is in effect and the X-Forwarded-Proto
header is set, use it to determine, if HTTPS is active or not.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 56

  1. Thorben Nissen uploaded patch set 1 09/03/20, 18:59

  2. TYPO3com voted on patch set 1 V +1 09/03/20, 19:13 Completed build in 13m 44s on Thu, 3 Sep, 07:13 PM Test Summary: 73181 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5200

  3. Christian Kuhn commented on patch set 1 CR -2 09/03/20, 19:25

    Thanks for your, however, I think we still should not do this. This issue comes up every once in a while and would open a security issue since clients could easily forge this header. For more information see: https://forge.typo3.org/issues/29693 and the discussion on patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/21853
  4. Anja Leichsenring abandoned the change 09/03/20, 19:29

    Hi Thorben, please don't mind me, but I am going to abandon your change. As Christian already wrote, there is no way it will ever be accepted into the core.
  5. Thorben Nissen commented on patch set 1 09/03/20, 19:31

    > Patch Set 1: Code-Review-2 > > Thanks for your, however, I think we still should not do this. > This issue comes up every once in a while and would open a security issue since clients could easily forge this header. > For more information see: https://forge.typo3.org/issues/29693 and the discussion on patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/21853 I don't thhink so. As opposed to the changes in the old version, I would only use the X-Forwarded-For header, if the REMOTE_ADDR matches the set reverseProxySSL or reverseProxy (if reverseProxySSL === '*'), meaning we are behind a proxy. As the proxy server by default does not forward this header, it can not be forged.
  6. Christian Kuhn commented on patch set 1 09/03/20, 20:49

    I see. I've re-opened the issue now. Feel free to submit a change with a new Change-Id, maybe link to this review, so we can re-discuss.