diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-20 18:14:42 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-21 16:07:01 +0100 |
commit | 39cbdca42975e4eb9da8906c45930117fa21e483 (patch) | |
tree | a395dd56919ab46057f5b58c4a7236876bb97498 | |
parent | a20c6049c396a2d3035dadb1398fe02e8ad43da7 (diff) | |
download | nextcloud-server-39cbdca42975e4eb9da8906c45930117fa21e483.tar.gz nextcloud-server-39cbdca42975e4eb9da8906c45930117fa21e483.zip |
Fixed path normalization to prevent dot dirs
Fixes #5945 where stat(.) would cause the backend OC to cache a dot dir
(only in older versions)
-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) { |