summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-04-24 13:31:17 +0200
committerJulius Härtl <jus@bitgrid.net>2020-04-24 14:46:07 +0200
commitd7161b4eee996554607d0d06da399cd299d8df52 (patch)
tree3fe3bab50c5c48ba1bb01970250e5282f2feaab3 /apps/dav/lib/Connector
parent84a35361599640d838815a4127eab58e49f052fc (diff)
downloadnextcloud-server-d7161b4eee996554607d0d06da399cd299d8df52.tar.gz
nextcloud-server-d7161b4eee996554607d0d06da399cd299d8df52.zip
Only catch anonymous OPTIONS for Office
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r--apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
index 63e57735972..e209f7f1af6 100644
--- a/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
@@ -67,9 +67,9 @@ class AnonymousOptionsPlugin extends ServerPlugin {
$emptyAuth = $request->getHeader('Authorization') === null
|| $request->getHeader('Authorization') === ''
|| trim($request->getHeader('Authorization')) === 'Bearer';
- $isAnonymousOption = $request->getMethod() === 'OPTIONS' && $emptyAuth;
+ $isAnonymousOfficeOption = $request->getMethod() === 'OPTIONS' && $isOffice && $emptyAuth;
$isOfficeHead = $request->getMethod() === 'HEAD' && $isOffice && $emptyAuth;
- if ($isAnonymousOption || $isOfficeHead) {
+ if ($isAnonymousOfficeOption || $isOfficeHead) {
/** @var CorePlugin $corePlugin */
$corePlugin = $this->server->getPlugin('core');
// setup a fake tree for anonymous access