Merge pull request #112 from Zentyal/ejhernandez/fix-crash-invalid-ics

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:
Jesús García Sáez
2015-03-24 19:13:57 +01:00
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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];