Catch invalid cache source storage path

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2021-03-24 10:36:51 +01:00 committed by backportbot[bot]
parent eeea77112e
commit c74a10ddb4
1 changed files with 4 additions and 0 deletions

View File

@ -612,6 +612,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);