diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-03-24 14:09:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 14:09:07 +0100 |
commit | 522882496f559d06ad96cb767087cbb9866feb8f (patch) | |
tree | d84c33d8af4b86d896e41ea4df8b9ed422c1d917 /lib | |
parent | eeea77112e229938a4c2b26c402be8ad46b2e698 (diff) | |
parent | c74a10ddb4b86b87e1ea7fab611d25ba53f23bc1 (diff) | |
download | nextcloud-server-522882496f559d06ad96cb767087cbb9866feb8f.tar.gz nextcloud-server-522882496f559d06ad96cb767087cbb9866feb8f.zip |
Merge pull request #26273 from nextcloud/backport/26270/stable19
[stable19] Catch invalid cache source storage path
Diffstat (limited to 'lib')
-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 a8877646494..26e23e21639 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -612,6 +612,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); |