dav icon indicating copy to clipboard operation
dav copied to clipboard

Can't update resource that has more than one shared lock

Open PVince81 opened this issue 5 years ago • 0 comments

See https://github.com/owncloud/core/issues/34360

Basically have two users set two different shared locks on the same resource.

Then do a curl call to overwrite the resource with PUT and pass one of the lock tokens in the "If" header: If: (<opaquelocktoken:c0a00927-27f4-4448-a0ec-3a5fb4588f13>).

The code in https://github.com/sabre-io/dav/blob/master/lib/DAV/Locks/Plugin.php#L487 doesn't differentiate between exclusive and shared lock. It treats them all as exclusive locks. So while one match was found and aknowledged, the fact that $mustLocks still contains entries here https://github.com/sabre-io/dav/blob/master/lib/DAV/Locks/Plugin.php#L517 will throw the exception.

@DeepDiver1975

PVince81 avatar Feb 01 '19 15:02 PVince81