diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-11 12:54:45 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-11 14:43:48 +0200 |
commit | 51e96dc3f6de6f38cc899ed771b8225858fa62c8 (patch) | |
tree | b8b38eae21d649260ac1f9be2497107454e7ee21 /lib | |
parent | 6e56a7b31e89b7abea4e9bcf78eec21f54dfd74c (diff) | |
download | nextcloud-server-51e96dc3f6de6f38cc899ed771b8225858fa62c8.tar.gz nextcloud-server-51e96dc3f6de6f38cc899ed771b8225858fa62c8.zip |
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 <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index adee8ced772..56514af6d80 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -27,6 +27,7 @@ namespace OC\Files\Storage\Wrapper; 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 @@ class Jail extends Wrapper { if ($path === '') { return $this->rootPath; } else { - return $this->rootPath . '/' . $path; + return Filesystem::normalizePath($this->rootPath . '/' . $path); } } |