mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix: fix unjailedroot of nested jails if there are other wrappers in between
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
e5aabded60
commit
195358eb8e
2 changed files with 8 additions and 5 deletions
|
|
@ -76,7 +76,7 @@ class Cache extends CacheJail {
|
|||
return $this->root;
|
||||
}
|
||||
|
||||
protected function getGetUnjailedRoot() {
|
||||
public function getGetUnjailedRoot() {
|
||||
return $this->sourceRootInfo->getPath();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,10 +35,13 @@ class CacheJail extends CacheWrapper {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue