diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2019-10-10 09:58:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-10 09:58:09 +0300 |
commit | 0174577164f570a241bbd32cbe0044dc6689c6f4 (patch) | |
tree | 66ac4ab1b3b5623213e7136b164123c8b4260ef3 | |
parent | 37c065b26034a7608b09ab67d9c79f3734b27cfe (diff) | |
parent | 02333841291d837567f6e9dd268f16a34bb882c7 (diff) |
Merge pull request #17013 from nextcloud/backport/16999/stable15
[stable15] Return the proper jailed path when requesting the root path
-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)); |