-
Notifications
You must be signed in to change notification settings - Fork 2.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
share receiver can rename a file in a locked folder by using the lock token of the owner #34338
Comments
other operations on items e.g. create file / put data do also work as the receiver by giving the owners lock token. |
GitMate.io thinks the contributors most likely able to help are @ownclouders, and @PVince81. Possibly related issues are #34337 (receiver cannot rename a locked share), #2816 (By renaming a shared folder the old folder is kept), #2170 (By renaming a shared folder is not shared any more), #29554 (overwriting a file with a folder and a folder with a file needs better error reporting), and #34300 (empty lock-token when unlocking public link results in an exception). |
so far we've been following https://tools.ietf.org/html/rfc4918 but that spec doesn't define any restrictions to users I found this proposal that extends that: https://tools.ietf.org/html/draft-reschke-webdav-locking-05#section-2.3 Submitting a lock token provides no special access rights. Anyone and https://tools.ietf.org/html/draft-reschke-webdav-locking-05#section-8.2.1 I'll check how far Sabre supports this... In any case, I think we should protect access to only the lock owner, like we do for UNLOCK. |
after discussing with @DeepDiver1975 and others, we agreed that locking is not a security thing but convenience. so the server will not enforce access in case a lock token is "abused". we'll keep this as is for the current release and might reconsider in future releases. moving to backlog |
Note: I updated the "Actual Behavior" in the original post. The receiver now gets a "success" 201 HTTP status, as well as the file is renamed. So the behavior is now consistent (HTTP status and actual action match). What needs to be decided now is if this is a bug or a feature. If a bug, then it needs to be scheduled to be fixed. If a feature, then we need to adjust the tests so that we expect the current behavior as correct. @micbar who can decide. |
Steps to reproduce
curl -u uu2:uu2 -X MOVE "http://localhost/owncloud-core/remote.php/dav/files/uu2/folder/file.txt" -H "Destination: http://localhost/owncloud-core/remote.php/dav/files/uu2/folder/renamed.txt" -H "If: (<opaquelocktoken:8eccec3d-9c12-49e0-8ad0-54c6a5169c9d>)" -v
Expected behaviour
HTTP response 423
File is not renamed
Actual behaviour
HTTP response 403
File is renamed
After
sabre/dav
4.20:HTTP response 201
File is renamed
(the behavior at least becomes consistent, even if it is wrong!)
Logs
Web server error log
ownCloud log (data/owncloud.log)
The text was updated successfully, but these errors were encountered: