Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Catch invalid cache source storage path
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Mar 24, 2021
commit c74a10ddb4b86b87e1ea7fab611d25ba53f23bc1
4 changes: 4 additions & 0 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
$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);

Expand Down