Skip to content

Commit 22626ae

Browse files
authored
Merge pull request #26272 from nextcloud/backport/26270/stable20
[stable20] Catch invalid cache source storage path
2 parents c555e86 + dfcf6ad commit 22626ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
627627
$targetPath = $this->normalize($targetPath);
628628

629629
$sourceData = $sourceCache->get($sourcePath);
630+
if ($sourceData === false) {
631+
throw new \Exception('Invalid source storage path: ' . $sourcePath);
632+
}
633+
630634
$sourceId = $sourceData['fileid'];
631635
$newParentId = $this->getParentId($targetPath);
632636

0 commit comments

Comments
 (0)