summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-21 09:01:47 -0800
committerVincent Petry <pvince81@owncloud.com>2013-11-21 09:01:47 -0800
commit3b48d23478572e42508aaf9f0501e163fa2886e0 (patch)
treec4e54a3b24f21c6d2b06a99019ddf50b6f4a7df0
parent4a2f9636cf567142f277b2691eb7c5df852313de (diff)
parent39cbdca42975e4eb9da8906c45930117fa21e483 (diff)
downloadnextcloud-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.php8
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) {