Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-03-24 12:36:51 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-03-24 12:36:51 +0300
commit2074d87d0cbd51bcd3797838f5e2af9a0a04ac23 (patch)
treed7694a032a75fead0ad23f73c344cee3607a204d /lib/private/Files/Cache
parentda6019df6737918f2a4e4246e0ea5666f527ca0b (diff)
Catch invalid cache source storage path
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/Cache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 59e50164ef6..b851076e2c1 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -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);