]> source.dussan.org Git - nextcloud-server.git/commitdiff
return user specific paths from oc_filecache::getpath
authorRobin Appelman <icewind@owncloud.com>
Mon, 16 Apr 2012 08:06:52 +0000 (10:06 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 16 Apr 2012 08:06:52 +0000 (10:06 +0200)
lib/filecache.php

index e62fb2189f48de06e0a0de6a919836f5197b237f..19286ff746b70672887f179ebe44fd347b095661 100644 (file)
@@ -335,7 +335,12 @@ class OC_FileCache{
                $query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE id=? AND user=?');
                $result=$query->execute(array($id,$user));
                $row=$result->fetchRow();
-               return $row['path'];
+               $path=$row['path'];
+               $root='/'.$user.'/files';
+               if(substr($path,0,strlen($root))!=$root){
+                       return false;
+               }
+               return substr($path,strlen($root));
        }
 
        /**