]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return the proper jailed path when requesting the root path 17013/head
authorJulius Härtl <jus@bitgrid.net>
Wed, 4 Sep 2019 11:14:53 +0000 (13:14 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 5 Sep 2019 07:24:46 +0000 (07:24 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/Files/Storage/Wrapper/Jail.php

index f21b5716467b44b55a605e1b833d079dbbda1edd..3dc2024d912f2f46dd46f2e8258324764b03e04b 100644 (file)
@@ -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));