Merge pull request #26272 from nextcloud/backport/26270/stable20

[stable20] Catch invalid cache source storage path
This commit is contained in:
Morris Jobke 2021-03-24 14:09:05 +01:00 committed by GitHub
commit 22626ae13f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -627,6 +627,10 @@ class Cache implements ICache {
$targetPath = $this->normalize($targetPath);
$sourceData = $sourceCache->get($sourcePath);
if ($sourceData === false) {
throw new \Exception('Invalid source storage path: ' . $sourcePath);
}
$sourceId = $sourceData['fileid'];
$newParentId = $this->getParentId($targetPath);