Skip to content

Commit ffd7778

Browse files
committed
extend anonymous options to work on every dav url
Signed-off-by: Robin Appelman <[email protected]>
1 parent 75c3737 commit ffd7778

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function initialize(\Sabre\DAV\Server $server) {
5050
* @return bool
5151
*/
5252
public function handleAnonymousOptions(RequestInterface $request, ResponseInterface $response) {
53-
if ($request->getMethod() === 'OPTIONS' && $request->getPath() === '') {
53+
if ($request->getMethod() === 'OPTIONS') {
5454
/** @var CorePlugin $corePlugin */
5555
$corePlugin = $this->server->getPlugin('core');
5656
// setup a fake tree for anonymous access

apps/dav/tests/unit/DAV/AnonymousOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testAnonymousOptionsRoot() {
5454
public function testAnonymousOptionsNonRoot() {
5555
$response = $this->sendRequest('OPTIONS', 'foo');
5656

57-
$this->assertEquals(401, $response->getStatus());
57+
$this->assertEquals(200, $response->getStatus());
5858
}
5959
}
6060

0 commit comments

Comments
 (0)