fix(Sharing): Don't break cache entry by setting path to null

see #58676

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2026-07-06 14:00:30 +02:00 committed by backportbot[bot]
parent cf73e9f638
commit 02073fd5ed

View file

@ -134,7 +134,11 @@ class Cache extends CacheJail {
protected function formatCacheEntry($entry, $path = null) {
if (is_null($path)) {
$path = $entry['path'] ?? '';
$entry['path'] = $this->getJailedPath($path);
$jailedPath = $this->getJailedPath($path);
if ($jailedPath === null) {
return false;
}
$entry['path'] = $jailedPath;
} else {
$entry['path'] = $path;
}