diff options
author | Robin Appelman <robin@icewind.nl> | 2018-11-23 18:14:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-23 18:14:17 +0100 |
commit | eadfa9069df66a17df5a399dd9a850fd177cd31a (patch) | |
tree | 5bc643d48fdfd4c4a4513b800f128aee68e75b7b | |
parent | 54f4c0c5cec3bb11e53b8027b411c30c879cc91a (diff) | |
parent | ffd77780406532964bf617f105ff7bcf2ee9c8f7 (diff) | |
download | nextcloud-server-eadfa9069df66a17df5a399dd9a850fd177cd31a.tar.gz nextcloud-server-eadfa9069df66a17df5a399dd9a850fd177cd31a.zip |
Merge pull request #12556 from nextcloud/anonymous-options-all
extend anonymous options to work on every dav url
-rw-r--r-- | apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/DAV/AnonymousOptionsTest.php | 2 |
2 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 7a62f706378..b69c1e0286c 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' && $request->getPath() === '') { + if ($request->getMethod() === 'OPTIONS') { /** @var CorePlugin $corePlugin */ $corePlugin = $this->server->getPlugin('core'); // setup a fake tree for anonymous access diff --git a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php index 4e440e6644b..87a778e596d 100644 --- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php +++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php @@ -54,7 +54,7 @@ class AnonymousOptionsTest extends TestCase { public function testAnonymousOptionsNonRoot() { $response = $this->sendRequest('OPTIONS', 'foo'); - $this->assertEquals(401, $response->getStatus()); + $this->assertEquals(200, $response->getStatus()); } } |