aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-09-04 20:52:10 +0200
committerGitHub <noreply@github.com>2019-09-04 20:52:10 +0200
commit30d00e63d92dd4ab6545f7716dc369d9815e79dd (patch)
treecc1135abb83c754815ccb53ef090029477474718
parent4456d01c6ed6bb6021d98dc527529f0de227d874 (diff)
parent64fe9bc287facfd176d16f1f6d37bd00b847b451 (diff)
downloadnextcloud-server-30d00e63d92dd4ab6545f7716dc369d9815e79dd.tar.gz
nextcloud-server-30d00e63d92dd4ab6545f7716dc369d9815e79dd.zip
Merge pull request #16999 from nextcloud/bugfix/noid/getJailedPath-root
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));