diff options
-rw-r--r-- | lib/filecache.php | 7 |
1 files changed, 6 insertions, 1 deletions
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)); } /** |