-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not pass '.' along as path #11764
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈🐘
i changed the jail.php like this:
but after reloading my Nextcloud-Page, the erros still occures. |
Replace it with public function getUnjailedPath($path) {
if ($path === '') {
return $this->rootPath;
} else {
return Filesystem::normalizePath($this->rootPath . '/' . $path);
}
} |
Red lines in the git diff means "removed line" and green "added line". |
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 <[email protected]>
8077a27
to
51e96dc
Compare
Have made this fix in a second instance and it works likewise. Perfect! |
Fixes #11637
When writing a file to the root of a shared storage we have to obtain
creatable information on the root of the share. However getting the
dirname of the path then results in
.
. Passing this along potentiallybreaks.
For example objectstores do not have the same hierachy as a normal fs.
So the file
.
doesn't mean anything in that context.Signed-off-by: Roeland Jago Douma [email protected]