Merge pull request #26271 from nextcloud/backport/26270/stable21
[stable21] Catch invalid cache source storage path
This commit is contained in:
commit
e5dc0b7ad1
|
@ -642,6 +642,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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue