diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 09:01:47 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 09:01:47 -0800 |
commit | 3b48d23478572e42508aaf9f0501e163fa2886e0 (patch) | |
tree | c4e54a3b24f21c6d2b06a99019ddf50b6f4a7df0 | |
parent | 4a2f9636cf567142f277b2691eb7c5df852313de (diff) | |
parent | 39cbdca42975e4eb9da8906c45930117fa21e483 (diff) | |
download | nextcloud-server-3b48d23478572e42508aaf9f0501e163fa2886e0.tar.gz nextcloud-server-3b48d23478572e42508aaf9f0501e163fa2886e0.zip |
Merge pull request #5970 from owncloud/extstorage-webdavdotdirfix
Fixed path normalization to prevent dot dirs
-rw-r--r-- | apps/files_external/lib/webdav.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 9ee7f555285..5857c59dcfc 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -323,11 +323,9 @@ class DAV extends \OC\Files\Storage\Common{ } public function cleanPath($path) { - if ( ! $path || $path[0]=='/') { - return substr($path, 1); - } else { - return $path; - } + $path = \OC\Files\Filesystem::normalizePath($path); + // remove leading slash + return substr($path, 1); } private function simpleResponse($method, $path, $body, $expected) { |