diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index f21b5716467b4..3dc2024d912f2 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -65,7 +65,7 @@ public function getUnjailedPath($path) { 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));