From: Robin Appelman Date: Mon, 16 Apr 2012 08:06:52 +0000 (+0200) Subject: return user specific paths from oc_filecache::getpath X-Git-Tag: v4.0.0beta~283 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b61f6438ba7aeabe17b26123cdeb34e011ce0080;p=nextcloud-server.git return user specific paths from oc_filecache::getpath --- diff --git a/lib/filecache.php b/lib/filecache.php index e62fb2189f4..19286ff746b 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -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)); } /**