summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-24 10:34:09 +0200
committerVincent Petry <pvince81@owncloud.com>2013-10-24 10:34:09 +0200
commitc186f334282f89fedd2ff3dbc268dbd6cba5b2c0 (patch)
tree181809a3d51d90892efdda39cf685515d141614d
parent2d14daf36bf6c808e55895c78b42144942b73246 (diff)
downloadnextcloud-server-c186f334282f89fedd2ff3dbc268dbd6cba5b2c0.tar.gz
nextcloud-server-c186f334282f89fedd2ff3dbc268dbd6cba5b2c0.zip
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
-rw-r--r--lib/base.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index ef574b2d895..dc6e0b12945 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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;
}