Issue Description
Stalwart allow setting invalid caldav color values and subsequently does not behave normally any more regarding this property.
Expected Behavior
I think stalwart should reject invalid properties that it uses internally.
Actual Behavior
The invalid value is accepted and can later on not be changed in standard ways.
Reproduction Steps
When creating a calendar via caldav with an invalid color property value (please don’t ask) like this
<?xml version="1.0" encoding="utf-8"?>
<D:mkcol xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:set>
<D:prop>
<D:resourcetype>
<D:collection/>
<C:calendar/>
</D:resourcetype>
<calendar-color xmlns="http://apple.com/ns/ical/">#</calendar-color>
</D:prop>
</D:set>
</D:mkcol>
Stalwart actually stores this information somehow, and it will be reported back as is for PROPFIND.
Internally, however, the color is not set (empty input field in the ui). It is subsequently possible to change the color in the stalwart ui (which also propagates via jmap, I suppose), but not for caldav, which will still show the invalid value. Additionally, it is not impossible to set the color via carddav PROPPATCH
<?xml version="1.0" encoding="utf-8"?>
<d:propertyupdate xmlns:d="DAV:">
<d:set>
<d:prop>
<calendar-color xmlns="http://apple.com/ns/ical/">#0000ff</calendar-color>
</d:prop>
</d:set>
</d:propertyupdate>
Only after removing the property altogether via PROPPATCH
<d:propertyupdate xmlns:d="DAV:">
<d:remove>
<d:prop>
<calendar-color xmlns="http://apple.com/ns/ical/"/>
</d:prop>
</d:remove>
</d:propertyupdate>
It starts behaving correctly again.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on