Send the requests through the middleware Pipeline in RequestHandler
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 May 2022 14:06:25 +0000 (16:06 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 19 May 2022 14:20:36 +0000 (16:20 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index 9cb4a6097658e62a6a3b94f8f98608084a847a8e..1de1d9aa602a1f869531dbd7444907e8fa0ba810 100644 (file)
@@ -7,6 +7,7 @@ use Laminas\Diactoros\ServerRequestFactory;
 use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
 use Psr\Http\Message\ResponseInterface;
 use wcf\http\LegacyPlaceholderResponse;
+use wcf\http\Pipeline;
 use wcf\system\application\ApplicationHandler;
 use wcf\system\box\BoxHandler;
 use wcf\system\exception\AJAXException;
@@ -103,8 +104,10 @@ class RequestHandler extends SingletonFactory
                 \header('cross-origin-resource-policy: same-site');
             }
 
+            $pipeline = new Pipeline([]);
+
             $this->sendPsr7Response(
-                $this->getActiveRequest()->handle($psrRequest)
+                $pipeline->process($psrRequest, $this->getActiveRequest())
             );
         } catch (NamedUserException $e) {
             $e->show();