-
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
Persistent lock on folder still allows to create files but not overwrite #33848
Comments
This feels like the lock is not doing its protective work correctly. => p2 |
https://tools.ietf.org/html/rfc4918#section-6.2 as far as I understand Webdav methods must pass the lock token to be able to perform operations (with exclusive lock) |
check litmus tests which seem to pass, and see what expectations are there |
agreed with @DeepDiver1975 that it looks like a bug due to inconsistency. |
need to clarify how expected behavior for shared lock vs exclusive lock for regular Webdav requests |
check if exclusive locks consistently block webdav methods, this is what Litmus already tests |
From the RFC: https://tools.ietf.org/html/rfc4918#section-7.4
To me this means that a user cannot create, delete nor rename any resource inside the collection. There's also a thing about the lock depth: if the depth is 0, the lock only affects the direct members of the collection, not sub-collections. With depth infinite, all children are affected / locked. From a quick debug I see that the locks from the collection are not retrieved when Sabre queries them on the path "files/user2/test/test.txt" |
as discussed with @DeepDiver1975:
|
for depth:0, Sabre doesn't support it currently: sabre-io/dav#297 |
For depth: infinite, here's a PR that fixes it: #34171 |
I think step 3 is not needed for reproducing the bug. Without sharing it also happens
|
indeed |
Same behavior happens with Public Link: Steps
Expected resultNeither initial upload nor overwrite should be allowed. Actual resultInitial upload goes through but overwrite says "Locked". |
@davitol does the PR solve that too or need extra work ? |
reopening as we missed the public link case |
I think the public link issue is fixed by #34224 |
it is, closing |
Steps
curl -u user1:test -X LOCK http://localhost/owncloud/remote.php/webdav/test -d "<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'> <d:lockscope><d:shared/></d:lockscope></d:lockinfo>"
Expected result
Neither initial upload nor overwrite should be allowed.
Actual result
Initial upload goes through but overwrite says "Locked".
Version
Observed while testing #32250, likely also present on master ac0f01b
@DeepDiver1975 is this by design ?
The text was updated successfully, but these errors were encountered: