add additional check if we have a valid uid and filename

This commit is contained in:
Bjoern Schiessle 2016-07-04 11:00:50 +02:00
parent 42d8ef5a0e
commit 717b480a2e
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
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;