Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable15] extend anonymous options to work on every dav url #12638

Merged
merged 1 commit into from Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
Expand Up @@ -50,7 +50,7 @@ public function initialize(\Sabre\DAV\Server $server) {
* @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
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
Expand Up @@ -54,7 +54,7 @@ public function testAnonymousOptionsRoot() {
public function testAnonymousOptionsNonRoot() {
$response = $this->sendRequest('OPTIONS', 'foo');

$this->assertEquals(401, $response->getStatus());
$this->assertEquals(200, $response->getStatus());
}
}

Expand Down