mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #16999 from nextcloud/bugfix/noid/getJailedPath-root
Return the proper jailed path when requesting the root path
This commit is contained in:
commit
30d00e63d9
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,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