Review 10.4 Merged

69192[BUGFIX] Fix HTTP_HOST verification when HTTPS is proxied to HTTP

Benjamin Franzke CR +2 V +2 Normal +67 −15 updated 05/19/21, 14:43

Commit message

The HTTP_HOST verification failed if the proxy server port was
different to the local webserver port, due to an assumption in
hostHeaderValueMatchesTrustedHostsPattern() that concluded
that the local webserver port needs to match the default
port of the proxy server.

In case a HTTPS termination proxy is used, that
assumption can not be made, as it is common
practice to use HTTP backends behind a HTTPS
proxy in private networks. Therefore the port
is now verified against the default port of
the current webserver, not a possible proxy server.

Scenario:
 * Proxy Server HTTPS (SSL termination) => Port 443
 * Application Server HTTP => Port 80
 * Default trustedHostsPattern setting

It was previously required to configure a (slow)
trustedHostsPattern to circumvent this issue.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3