Only run the AnonymousOptionsPlugion on Anonymous requests

Fixes #12744

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/12808/head
Roeland Jago Douma 6 years ago
parent a915594b03
commit 28474612e4
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 2
      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

Loading…
Cancel
Save