Remove WebDAV redirect from the root path

This will prevent people mounting the root path.
They should use the full webdav path instead.

Fixes #4923
This commit is contained in:
Vincent Petry 2013-10-24 10:34:09 +02:00
parent 2d14daf36b
commit c186f33428
1 changed files with 5 additions and 1 deletions

View File

@ -687,7 +687,11 @@ class OC {
}
// Handle WebDAV
if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND') {
header('location: ' . OC_Helper::linkToRemote('webdav'));
// not allowed any more to prevent people
// mounting this root directly.
// Users need to mount remote.php/webdav instead.
header('HTTP/1.1 405 Method Not Allowed');
header('Status: 405 Method Not Allowed');
return;
}