Skip to content

Commit ef87e2e

Browse files
authored
Merge pull request #58676 from nextcloud/jail-wrapper-null-paths
fix: don't return cache entries with null paths
2 parents 52d322a + 76ce955 commit ef87e2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/private/Files/Cache/Wrapper/CacheJail.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ protected function getJailedPath(string $path, ?string $root = null) {
102102
#[\Override]
103103
protected function formatCacheEntry($entry) {
104104
if (isset($entry['path'])) {
105-
$entry['path'] = $this->getJailedPath($entry['path']);
105+
$jailedPath = $this->getJailedPath($entry['path']);
106+
if ($jailedPath !== null) {
107+
$entry['path'] = $jailedPath;
108+
} else {
109+
return false;
110+
}
106111
}
107112
return $entry;
108113
}

0 commit comments

Comments
 (0)