-
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
Public webdav should not be able to lock read-only public links #34347
Comments
we should probably also limit this for local shares: don't allow locking on read-only shares. |
however, some client with read-only access might wish to take out a lock while they are using the data in the file/folder because, for whatever reason, they want to ensure that the data does not change for the time that they hold the lock. |
too late... already implemented: #34349 I'm fine rejecting this if we all agree with #34347 (comment) |
I don't know what to say. It depends on the RFC, how the RFC is interpreted, how much we want to implement it, how much we want to "extend" it,... Implementing this will not hurt anything immediately, or for the future, because it restricts the ability to use locks. So if we later want to reverse the decision and allow readers to lock read-only resources then that will extend functionality and thus will not be a nasty backward-compatible break. In the reverse, if we release without this restriction, then it will be hard to add the restriction a year down the track. (Similar for public links - for now we restrict what "the public" can do with locking. Then if we decide to open it up in future there is not a big backward-compatibility problem.) |
PR to block LOCK/UNLOCK for public endpoint: #34351 might need to adjust acceptance tests as well |
Steps
curl -u $PUBLICTOKEN: -X LOCK http://localhost/owncloud/public.php/webdav/abc -d "<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'> <d:lockscope><d:exclusive/></d:lockscope></d:lockinfo>" -H 'Depth: infinite'
Expected result
Cannot lock as this is read-only access. The locks are there only for write access.
Actual result
Lock acquired.
Version
10.1.0 RC1
@davitol @individual-it @DeepDiver1975 seeing this I tend more in the direction of preventing the LOCK / UNLOCK verbs completely on public links. This will save a lot of pain and other related bugs. For now.
The text was updated successfully, but these errors were encountered: