Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.27k stars 427 forks source link

Improve handling of unescape commas #1558

Open lkmorlan opened 2 weeks ago

lkmorlan commented 2 weeks ago

I added some vcf files to the Radicale directory. When I caused my phone to synchronize, I got this error message:

ERROR: An exception occurred during PROPFIND request on 'DIRECTORY': Failed to load item 'FILENAME' in 'DIRECTORY': At line 9: In transformFromNative, unhandled exception on line 9 <class 'AttributeError'>: 'list' object has no attribute 'replace'

I eventually discovered that he problem is that every comma in a property value must be escaped by a backslash; after replacing , with \,, the error message did not appear and synchronization worked.

There ought to be better handling of this situation. It should either tolerate an unescaped comma or provide a better error message.

pbiering commented 2 weeks ago

@lkmorlan : can you confirm that all added VCF files are passing the validator: https://icalendar.org/validator.html

pbiering commented 2 weeks ago

There ought to be better handling of this situation. It should either tolerate an unescaped comma or provide a better error message.

Responsible for this message is https://github.com/py-vobject/vobject, radicale is only forwarding the error message, see https://github.com/Kozea/Radicale/blob/bd66d585406c15ff0d4ec76cfe8b152255029a24/radicale/storage/multifilesystem/get.py#L109

lkmorlan commented 2 weeks ago

The validator linked to in a for iCalendar not vCard.

@da4089 Thanks for filing the upstream issue.