diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-24 10:05:21 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-24 10:05:21 -0700 |
commit | 54e9d8c306b1a443ab1ba921d4e450c7477d0445 (patch) | |
tree | 89f169d8a327d028361400917c2e467c234e12fc | |
parent | 222f1b8da27b396dd40902237766fbfd945a439c (diff) | |
parent | c3f62d983f3536c9e261ce7a210d5610775fd5f0 (diff) | |
download | nextcloud-server-54e9d8c306b1a443ab1ba921d4e450c7477d0445.tar.gz nextcloud-server-54e9d8c306b1a443ab1ba921d4e450c7477d0445.zip |
Merge pull request #5507 from owncloud/webdav-removeredirectfromindex
Remove WebDAV redirect from the root path
-rw-r--r-- | files/webdav.php | 30 | ||||
-rw-r--r-- | lib/base.php | 6 |
2 files changed, 5 insertions, 31 deletions
diff --git a/files/webdav.php b/files/webdav.php deleted file mode 100644 index 87dd0191969..00000000000 --- a/files/webdav.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * ownCloud - * - * @author Frank Karlitschek - * @author Jakob Sack - * @copyright 2012 Frank Karlitschek frank@owncloud.org - * @copyright 2011 Jakob Sack kde@jakobsack.de - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -// only need filesystem apps -$RUNTIME_APPTYPES=array('filesystem', 'authentication'); -require_once '../lib/base.php'; -$baseuri = OC::$WEBROOT. '/files/webdav.php'; -require_once 'apps/files/appinfo/remote.php'; diff --git a/lib/base.php b/lib/base.php index 62427fa568c..3f89b51a61c 100644 --- a/lib/base.php +++ b/lib/base.php @@ -688,7 +688,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; } |