From: Tim Düsterhus Date: Thu, 30 Jun 2022 09:44:51 +0000 (+0200) Subject: Specify `null` for the superglobals in ServerRequestFactory::fromGlobals() X-Git-Tag: 6.0.0_Alpha_1~1133^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e23d71935768d6664caa46932a6c385cb34782e6;p=GitHub%2FWoltLab%2FWCF.git Specify `null` for the superglobals in ServerRequestFactory::fromGlobals() Diactoros does not use `$_COOKIE` internally, but parses the `Cookie` header instead, because PHP mangles cookie names when parsing into `$_COOKIE`. --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 7e08c2efd9..4ed1d04ce1 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -74,11 +74,11 @@ final class RequestHandler extends SingletonFactory } $psrRequest = ServerRequestFactory::fromGlobals( - $_SERVER, - $_GET, - $_POST, - $_COOKIE, - $_FILES, + null, // $_SERVER + null, // $_GET + null, // $_POST + null, // $_COOKIE + null, // $_FILES FilterUsingXForwardedHeaders::trustProxies( ['*'], [FilterUsingXForwardedHeaders::HEADER_PROTO]