Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: fix unjailedroot of nested jails if there are other wrappers in …
…between

Signed-off-by: Robin Appelman <[email protected]>

[skip ci]
  • Loading branch information
icewind1991 authored and backportbot[bot] committed May 15, 2025
commit 143ef833e118a248c1f714610714fc0146d7658b
11 changes: 7 additions & 4 deletions lib/private/Files/Cache/Wrapper/CacheJail.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ public function __construct(
parent::__construct($cache, $dependencies);
$this->root = $root;

if ($cache instanceof CacheJail) {
$this->unjailedRoot = $cache->getSourcePath($root);
} else {
$this->unjailedRoot = $root;
$this->unjailedRoot = $root;
$parent = $cache;
while ($parent instanceof CacheWrapper) {
if ($parent instanceof CacheJail) {
$this->unjailedRoot = $parent->getSourcePath($this->unjailedRoot);
}
$parent = $parent->getCache();
}
}

Expand Down