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>
This commit is contained in:
Roeland Jago Douma 2018-10-11 12:54:45 +02:00
parent feb8a795ea
commit 18c35e6060
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}
}