dav icon indicating copy to clipboard operation
dav copied to clipboard

`NOT` in If is not always correctly evaluated.

Open evert opened this issue 10 years ago • 1 comments

This causes a litmus test to fail. See #702 for lots of detail.

The gist of it is this:

(Not <DAV:no-lock> ["c3d40b11121145ec31f5c1acc078b658"])

Should be interepreted as:

(Not <DAV:no-lock>) AND (["c3d40b11121145ec31f5c1acc078b658"])

Currently it is interpreted as:

Not (<DAV:no-lock> AND ["c3d40b11121145ec31f5c1acc078b658"])

The NOT can actually appear both in front of the lock token and the etag. Our data-structure assumes one NOT that appears in front of both. This needs to be tweaked and might be a breaking change.

evert avatar Sep 04 '15 16:09 evert

Sabre\DAV\Server::getIfConditions() implementation is very simple. It won't handle properly also (Not ["etag1"] Not ["etag2"]), nor (["tag1"] Not <opaquetoken:test>), nor anything with more than two conditions.

Spec: https://datatracker.ietf.org/doc/html/rfc4918#section-10.4.2

alecpl avatar Dec 11 '25 18:12 alecpl