aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorJosh Richards <josh.t.richards@gmail.com>2023-08-03 09:53:46 -0400
committerGitHub <noreply@github.com>2023-08-03 09:53:46 -0400
commitdeecb48e54c50ebb8cac092be1f1fc111d9941c6 (patch)
tree58c3f2d6e3a59ef50046cf414ea45ace72490f42 /lib/private/Files
parent9a7e2b15580578b4de3eb36808dc466a9fd6b976 (diff)
downloadnextcloud-server-deecb48e54c50ebb8cac092be1f1fc111d9941c6.tar.gz
nextcloud-server-deecb48e54c50ebb8cac092be1f1fc111d9941c6.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/private/Files')
-rw-r--r--lib/private/Files/Cache/Cache.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 4770e168bfb..d3593cac8b9 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -668,7 +668,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);
}