Merge pull request #17012 from nextcloud/backport/16999/stable16
[stable16] Return the proper jailed path when requesting the root path
This commit is contained in:
commit
dc4c74a716
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ class Jail extends Wrapper {
|
|||
public function getJailedPath($path) {
|
||||
$root = rtrim($this->rootPath, '/') . '/';
|
||||
|
||||
if (strpos($path, $root) !== 0) {
|
||||
if ($path !== $this->rootPath && strpos($path, $root) !== 0) {
|
||||
return null;
|
||||
} else {
|
||||
$path = substr($path, strlen($this->rootPath));
|
||||
|
|
Loading…
Reference in a new issue