[Pkg-owncloud-commits] [owncloud] 48/239: Fixed path normalization to prevent dot dirs

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 39cbdca42975e4eb9da8906c45930117fa21e483
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Nov 20 18:14:42 2013 +0100

    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)
---
 apps/files_external/lib/webdav.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 9ee7f55..5857c59 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list