From 8936b3c465b4e3f63b3d35432c8853400f6fc613 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 2 Mar 2026 18:14:33 +0100 Subject: [PATCH] fix: don't return cache entries with null paths Signed-off-by: Robin Appelman --- lib/private/Files/Cache/Wrapper/CacheJail.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index f283eec147d31..67797ce0ce747 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -100,7 +100,12 @@ protected function getJailedPath(string $path, ?string $root = null) { protected function formatCacheEntry($entry) { if (isset($entry['path'])) { - $entry['path'] = $this->getJailedPath($entry['path']); + $jailedPath = $this->getJailedPath($entry['path']); + if ($jailedPath !== null) { + $entry['path'] = $jailedPath; + } else { + return false; + } } return $entry; }