diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-24 10:34:09 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-24 10:34:09 +0200 |
commit | c186f334282f89fedd2ff3dbc268dbd6cba5b2c0 (patch) | |
tree | 181809a3d51d90892efdda39cf685515d141614d | |
parent | 2d14daf36bf6c808e55895c78b42144942b73246 (diff) | |
download | nextcloud-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.php | 6 |
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; } |