Seen on SOGo 5.12.12 (mailcow image ghcr.io/mailcow/sogo:5.12.12-1); the code is unchanged on master.
When an event's ORGANIZER contains characters that are special in XML, the
ActiveSync Sync response for its calendar is not well-formed. libwbxml then
refuses it and SOGo answers HTTP 200 with an empty body:
sogod [47]: <0x...[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
sogod [47]: [ERROR] <0x...[NSDataMalloc]> xml2wbxml failed: Parsing of XML Document Failed
sogod [47]: ... "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=...&DeviceType=Android HTTP/1.1" 200 0/95 0.270 - - 0 - 13
The client takes the empty answer as "no change", so every item in the same
window is never delivered, and the sync stays stuck on that window on every
later request. CalDAV clients are not affected.
Doctolib (a large French medical booking service) sends invitations whose
organizer has angle brackets. Once such an invitation is imported (here with
Evolution), the calendar stops syncing over EAS:
ORGANIZER;CN=Doctolib:mailto:<no-reply@doctolib.fr>
Cause: in ActiveSync/iCalEvent+ActiveSync.m, the organizer email is
appended raw, whereas the attendee email a few lines below is escaped:
o = [organizer rfc822Email];
if (![self recurrenceId] && [o length])
{
[s appendFormat: @"<Organizer_Email xmlns=\"Calendar:\">%@</Organizer_Email>", o];
[s appendFormat: @"<Attendee_Email xmlns=\"Calendar:\">%@</Attendee_Email>", [[attendee rfc822Email] activeSyncRepresentationInContext: context]];
Suggested fix:
[s appendFormat: @"<Organizer_Email xmlns=\"Calendar:\">%@</Organizer_Email>", [o activeSyncRepresentationInContext: context]];
It may be worth checking the other appendFormat: calls of the ActiveSync
representations for raw values too (any string coming from the iCalendar
data). |