cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
531 stars 146 forks source link

"No value for ATTENDEE property" error #3452

Open karagian opened 3 years ago

karagian commented 3 years ago

Hello, we are using cyrus v3.0.11 and have personal and shared calendars and contacts on the server. Some clients use Outlook in combination with CalDav Synchronizer, which generally works fine, but from time to time, the following error occurs:

CalDavSynchronizer.DataAccess.WebDavClientException: Response status code does not indicate success: '403' ('Forbidden'). Message:
<?xml version="1.0" encoding="utf-8"?>
<D:error xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><C:valid-calendar-data/><D:responsedescription>No value for ATTENDEE property. Removing entire property:</D:responsedescription></D:error>

CalDav synchronizer fails to sync the collection after this until the problematic event is deleted. Has anybody else seen this happening?

The error message comes from the server and more specifically from the code in imap/ical_support.c which interfaces libical. There are several exceptions there for this error (empty property value) coming from libical when parsing (LOCATION, COMMENT, DESCRIPTION, SUMMARY, URL). I guess adding another exception there would fix the problem but I'm not sure of what the impact would be form that change. The error message states that the property is eventually removed...

elliefm commented 3 years ago

You might wish to also send this question to the info@cyrus.topicbox.com mailing list? You're much more likely to find others familiar with Outlook/CalDav Synchronizer there, who might have suggestions or workarounds.

Looks like the code you found is this:

                /* Check if this is an empty property error */
                if (sscanf(errstr,
                           "No value for %255s property", propname) == 1) {
                    /* Empty LOCATION is OK */
                    if (!strcasecmp(propname, "LOCATION")) continue;
                    if (!strcasecmp(propname, "COMMENT")) continue;
                    if (!strcasecmp(propname, "DESCRIPTION")) continue;
                    if (!strcasecmp(propname, "SUMMARY")) continue;

                    /* For iOS 11 */
                    if (!strcasecmp(propname, "URL")) continue;
                }

Yeah, given there's already an exception in there for iOS 11 including empty "URL", it might be okay to just add another exception for Outlook including empty "ATTENDEE". But I'm not certain, I don't know much about how else these properties might be used, or whether accepting an empty ATTENDEE property could cause other problems later...

@ksmurchison do you have any insight here? Is it safe for Cyrus to just accept an empty ATTENDEE property, or will this case need to be handled differently from LOCATION etc?

ksmurchison commented 3 years ago

Argh! I hate clients that don't follow specs. ATTENDEE is defined to be a URI per RFC 5545 which should never be empty. We could try allowing an empty ATTENDEE, but I haven't thought through what this might break, if anything.

elliefm commented 3 years ago

Can we accept it, but rip the empty ATTENDEE out entirely before storing it? Or will that just cause a new class of problems when our copy of the event is now different from the client's copy?

I guess I can imagine some client sync algorithm looking at both and going "oh the empty attendee is missing on the remote copy, better add it back..."

karagian commented 3 years ago

Hi, as Ken mentioned, the ATTENDEE property should probably not be empty, according to the RFC, so I guess the issue is on the client side. I reported the issue to their ticketing system: https://sourceforge.net/p/outlookcaldavsynchronizer/tickets/1548/ Hopefully it gets fixed from there...

karagian commented 3 years ago

Hi, I'm coming back to this as there were some news regarding the Caldav synchronizer ticket. I was asked for exporting the meeting that was causing the issue. I managed to do it while the problem was happening. I'm attaching both exported events from outlook and server side here It seems that the event does have valid attendee properties as Alexander Nimmervoll mentioned in the caldav synchronizer ticket.. So, could it be something on the server side? ics.zip