diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-09-04 13:14:53 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-04 13:25:17 +0200 |
commit | 64fe9bc287facfd176d16f1f6d37bd00b847b451 (patch) | |
tree | 4ed19848876a9cd79b41017ff180687d60822c76 | |
parent | 361ff3127eff8ba2f63bfbd9d56e7d39cd97c83f (diff) | |
download | nextcloud-server-64fe9bc287facfd176d16f1f6d37bd00b847b451.tar.gz nextcloud-server-64fe9bc287facfd176d16f1f6d37bd00b847b451.zip |
Return the proper jailed path when requesting the root path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index f21b5716467..3dc2024d912 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -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)); |