Skip to content

Commit

Permalink
Normalize getUnjailedPath
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rullzer committed Oct 11, 2018
1 parent feb8a79 commit 18c35e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Files/Storage/Wrapper/Jail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -56,7 +57,7 @@ public function getUnjailedPath($path) {
if ($path === '') {
return $this->rootPath;
} else {
return $this->rootPath . '/' . $path;
return Filesystem::normalizePath($this->rootPath . '/' . $path);
}
}

Expand Down

0 comments on commit 18c35e6

Please sign in to comment.