ECalClient: Remove libical errors from components on write
I have compiled libical using ICAL_ALLOW_EMPTY_PROPERTIES=OFF. I receive an iCalendar invitation containing LOCATION;LANGUAGE=en-US:
. Evolution-calendar-factory replaces it on PUT with
> X-LIC-ERROR;X-LIC-ERRORTYPE=VALUE-PARSE-ERROR:No value for LOCATION
> property. Removing entire property:
. The CalDAV server has also libical with ICAL_ALLOW_EMPTY_PROPERTIES=OFF and on parsing of this input it finds errors. Errors mean here, X-LIC-ERROR property. In turn the input is rejected. If the input had no X-LIC-ERROR properties, e.g. if the empty properties were preserved, the input would have been accepted.
I propose removing all X-LIC-ERROR properties before uploading a file over CalDAV, e.g. by calling icalcomponent_strip_errors()
, or by refusing to upload, if there are errors in the iCalendar file.
Edited by Milan Crha