diff options
author | Josh Richards <josh.t.richards@gmail.com> | 2023-08-03 09:53:46 -0400 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-08-05 22:04:35 +0000 |
commit | c4505160a0a75f91609f054269d59d93f0f8e6e6 (patch) | |
tree | 25390aa20f13b2b1ca95558cd76395b572e3aa9b /lib | |
parent | e4260cd855f8c1b7fd0b15d97f8239d076b0e71e (diff) | |
download | nextcloud-server-c4505160a0a75f91609f054269d59d93f0f8e6e6.tar.gz nextcloud-server-c4505160a0a75f91609f054269d59d93f0f8e6e6.zip |
Catch more invalid cache source storage paths
OC\Files\Cache\Cache::get can return string|false|null, not just string|false.
- nextcloud/server#26270 added handling of false, but null is needed too.
- Well, or we change the default $resullt to false, but I'm not sure if that has other ramifications and the real need here is to simply catch situations where the cache source storage path is not valid for whatever reason
Related: nextcloud/server#19009
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index bf459b2ff86..b773306ec45 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -663,7 +663,7 @@ class Cache implements ICache { $targetPath = $this->normalize($targetPath); $sourceData = $sourceCache->get($sourcePath); - if ($sourceData === false) { + if ($sourceData === false || $sourceData === null) { throw new \Exception('Invalid source storage path: ' . $sourcePath); } |