]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove WebDAV redirect from the root path
authorVincent Petry <pvince81@owncloud.com>
Thu, 24 Oct 2013 08:34:09 +0000 (10:34 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 24 Oct 2013 08:34:09 +0000 (10:34 +0200)
This will prevent people mounting the root path.
They should use the full webdav path instead.

Fixes #4923

lib/base.php

index ef574b2d89525714ac15c28ebb30b7b884b6c2e8..dc6e0b12945242cb00c4d8c91619c81de853c9a2 100644 (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;
                }