]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only run the AnonymousOptionsPlugion on Anonymous requests 12812/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 4 Dec 2018 10:55:04 +0000 (11:55 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 4 Dec 2018 12:12:11 +0000 (12:12 +0000)
Fixes #12744

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php

index b69c1e0286cfef548352a4df9b4e0426ed13fe60..390cb4a9c67c2bd626ce64e375cf67eade5bb15d 100644 (file)
@@ -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