Skip to content
Snippets Groups Projects
Unverified Commit 30d00e63 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #16999 from nextcloud/bugfix/noid/getJailedPath-root

Return the proper jailed path when requesting the root path
parents 4456d01c 64fe9bc2
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment