summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-20 18:14:42 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-21 16:07:01 +0100
commit39cbdca42975e4eb9da8906c45930117fa21e483 (patch)
treea395dd56919ab46057f5b58c4a7236876bb97498
parenta20c6049c396a2d3035dadb1398fe02e8ad43da7 (diff)
downloadnextcloud-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.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) {