From: Julius Härtl Date: Wed, 4 Sep 2019 11:14:53 +0000 (+0200) Subject: Return the proper jailed path when requesting the root path X-Git-Tag: v15.0.13rc1~27^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F17013%2Fhead;p=nextcloud-server.git Return the proper jailed path when requesting the root path Signed-off-by: Julius Härtl --- 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));