Merge pull request #304 from nextcloud/versions-fix

add additional check if we have a valid uid and filename
This commit is contained in:
Morris Jobke 2016-07-04 12:24:10 +02:00 committed by GitHub
commit 01f6f26343
1 changed files with 4 additions and 0 deletions

View File

@ -321,6 +321,10 @@ class Storage {
// add expected leading slash
$file = '/' . ltrim($file, '/');
list($uid, $filename) = self::getUidAndFilename($file);
if ($uid === null || trim($filename, '/') === '') {
return false;
}
$users_view = new View('/'.$uid);
$files_view = new View('/'. User::getUser().'/files');
$versionCreated = false;