From 51e96dc3f6de6f38cc899ed771b8225858fa62c8 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 11 Oct 2018 12:54:45 +0200 Subject: [PATCH] Normalize getUnjailedPath Fixes #11637 If we do not normalize the unjailed path we might end up with a path like files/user/folder/. which can break on objectstores Signed-off-by: Roeland Jago Douma --- lib/private/Files/Storage/Wrapper/Jail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index adee8ced77247..56514af6d8015 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -27,6 +27,7 @@ use OC\Files\Cache\Wrapper\CacheJail; use OC\Files\Cache\Wrapper\JailPropagator; +use OC\Files\Filesystem; use OCP\Files\Storage\IStorage; use OCP\Lock\ILockingProvider; @@ -56,7 +57,7 @@ public function getUnjailedPath($path) { if ($path === '') { return $this->rootPath; } else { - return $this->rootPath . '/' . $path; + return Filesystem::normalizePath($this->rootPath . '/' . $path); } }