-
Notifications
You must be signed in to change notification settings - Fork 44
Refactor StorageFolder::newFile() and newFolder() #167
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
Conversation
Signed-off-by: Daniel Rudolf <[email protected]>
Nextcloud's file operations API apparently is unable to proberly deal with relative paths (even though the docs tell us otherwise). It (a) performs file permission checks on the base directory rather than the respective parent directory (:confused:), and (b) blocks relative paths like '..' (likely as a security measure - by using the most unsophisticated approach :unamused:). Also see nextcloud/server#26396. We better do this on our own... Fixes #141 Signed-off-by: Daniel Rudolf <[email protected]>
|
Unfortunately I cannot test this since I get when I try to apply the patch... |
|
@PhrozenByte if you want to test this yourself you should be able to reproduce this issue by following:
|
|
No need to apply the patch manually, simply clone the branch (or download the source ZIP from https://github.com/nextcloud/cms_pico/archive/refs/heads/bugfix/141.zip) and run |
|
Thanks! I've done that in a VM and I can report that it fixes my issues with read only root folder. Thank you! :) |
Signed-off-by: Daniel Rudolf <[email protected]>
|
Let's give @matrois a few more days to test this, too. |
Signed-off-by: Daniel Rudolf <[email protected]>
Nextcloud's file operations API apparently is unable to proberly deal with relative paths (even though the docs tell us otherwise). It …
..(likely as a security measure - by using the most unsophisticated approach 😒).Also see nextcloud/server#26396.
Fixes #141 #165
@szaimen @matrois: Since I still don't know what exactly you guys are doing to cause this issue, I couldn't test it. Please give it a try.