Detect misconfigured hostnames during WCFSetup
Misconfigured reverse reverse proxies might rewrite the `host` header to the
upstream's hostname, instead of preserving the `host` as it was sent by the
web browser. Such a misconfiguration will cause WoltLab Suite to generate
incorrect absolute URLs and more importantly this also causes it to specify
an incorrect `domain` within cookies. The latter leads to the browser ignoring
the cookie. At the end of WCFSetup this ultimately leads to the ACP session
cookie being ignored, which in turn leads to failing the transition from
WCFSetup into the package installation. Instead the user will be bounced to
the LoginForm which fails to load, because the necessary option.xml was not
yet installed.
An example HAProxy configuration that reproduces the issue is as follows:
listen test
mode http
bind *:80
http-request set-header host 172.19.0.5
server nginx 172.19.0.5:80
If the WCFSetup is accepted via any hostname that is not `172.19.0.5`, e.g.
by using `localhost` then cookies will fail to stick within the web browser.
This commit extends the system requirements step to:
- Compare the HTTP_HOST as seen by the web server against both:
1) The `Referer` header.
2) The `window.location.host` value in JavaScript.
If any of those mismatches, then the web server is not correctly configured.
- Read a cookie that was set earlier.
If this cookie is missing, then most likely the `domain` property was
incorrectly specified.
This commit most likely resolves #3024.