From: Roeland Jago Douma Date: Tue, 4 Dec 2018 10:55:04 +0000 (+0100) Subject: Only run the AnonymousOptionsPlugion on Anonymous requests X-Git-Tag: v14.0.5RC1~64^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=877b23a3fd9c7c9513f9b352b3797efe4cfa0603;p=nextcloud-server.git Only run the AnonymousOptionsPlugion on Anonymous requests Fixes #12744 Signed-off-by: Roeland Jago Douma --- diff --git a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php index b69c1e0286c..390cb4a9c67 100644 --- a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php @@ -50,7 +50,7 @@ class AnonymousOptionsPlugin extends ServerPlugin { * @return bool */ public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) { - if ($request->getMethod() === 'OPTIONS') { + if ($request->getHeader('Authorization') === null && $request->getMethod() === 'OPTIONS') { /** @var CorePlugin $corePlugin */ $corePlugin = $this->server->getPlugin('core'); // setup a fake tree for anonymous access