summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-09-04 13:14:53 +0200
committerJulius Härtl <jus@bitgrid.net>2019-09-04 13:25:17 +0200
commit64fe9bc287facfd176d16f1f6d37bd00b847b451 (patch)
tree4ed19848876a9cd79b41017ff180687d60822c76
parent361ff3127eff8ba2f63bfbd9d56e7d39cd97c83f (diff)
downloadnextcloud-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.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));