From e23d71935768d6664caa46932a6c385cb34782e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 30 Jun 2022 11:44:51 +0200 Subject: [PATCH] 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`. --- .../files/lib/system/request/RequestHandler.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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] -- 2.20.1