summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-10-10 08:58:09 +0200
committerGitHub <noreply@github.com>2019-10-10 08:58:09 +0200
commit0174577164f570a241bbd32cbe0044dc6689c6f4 (patch)
tree66ac4ab1b3b5623213e7136b164123c8b4260ef3
parent37c065b26034a7608b09ab67d9c79f3734b27cfe (diff)
parent02333841291d837567f6e9dd268f16a34bb882c7 (diff)
downloadnextcloud-server-0174577164f570a241bbd32cbe0044dc6689c6f4.tar.gz
nextcloud-server-0174577164f570a241bbd32cbe0044dc6689c6f4.zip
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.php2
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));