diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-24 12:36:51 +0300 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-24 12:36:51 +0300 |
commit | 2074d87d0cbd51bcd3797838f5e2af9a0a04ac23 (patch) | |
tree | d7694a032a75fead0ad23f73c344cee3607a204d /lib/private/Files/Cache | |
parent | da6019df6737918f2a4e4246e0ea5666f527ca0b (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.php | 4 |
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); |