diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-24 10:36:51 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-03-24 10:36:51 +0100 |
commit | 2074d87d0cbd51bcd3797838f5e2af9a0a04ac23 (patch) | |
tree | d7694a032a75fead0ad23f73c344cee3607a204d | |
parent | da6019df6737918f2a4e4246e0ea5666f527ca0b (diff) | |
download | nextcloud-server-2074d87d0cbd51bcd3797838f5e2af9a0a04ac23.tar.gz nextcloud-server-2074d87d0cbd51bcd3797838f5e2af9a0a04ac23.zip |
Catch invalid cache source storage path
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-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); |