From 877b23a3fd9c7c9513f9b352b3797efe4cfa0603 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 4 Dec 2018 11:55:04 +0100 Subject: [PATCH] Only run the AnonymousOptionsPlugion on Anonymous requests Fixes #12744 Signed-off-by: Roeland Jago Douma --- apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5