mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 02:15:36 +00:00
oc-calendar: do not crash with invalid events
A failure in parsing an ICS makes return a nil calendar object. Instead of creating an appointment with nil information which can lead to crashes like the one generated creating PidLidCleanGlobalObjectId property. We return an empty message with no information which is taken into account in Outlook but not displayed like in SOGo webmail does.
This commit is contained in:
@@ -181,6 +181,12 @@ static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||
else
|
||||
{
|
||||
origCalendar = [sogoObject calendar: YES secure: YES];
|
||||
if (!origCalendar)
|
||||
{
|
||||
[self errorWithFormat: @"Incorrect calendar event %@. Empty message is created",
|
||||
[self url]];
|
||||
return self;
|
||||
}
|
||||
calendar = [origCalendar mutableCopy];
|
||||
masterEvent = [[calendar events] objectAtIndex: 0];
|
||||
[self _setupAttachmentParts];
|
||||
|
||||
Reference in New Issue
Block a user