(fix) fixed potential organizer highjacking when using EAS (#3131)

pull/89/head
Ludovic Marcotte 2015-06-10 10:47:30 -04:00
parent 88cab67f6d
commit b1453e1d7e
2 changed files with 21 additions and 6 deletions

View File

@ -506,14 +506,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[self setOrganizer: person];
}
//
// iOS is plain stupid here. It seends event invitations with no Organizer.
// We check this corner-case and if MeetingStatus == 1 (see http://msdn.microsoft.com/en-us/library/ee219342(v=exchg.80).aspx or details)
// and there's no organizer, we fake one.
//
if ((o = [theValues objectForKey: @"MeetingStatus"]))
{
if ([o intValue] == 1 && ![theValues objectForKey: @"Organizer_Email"])
//
// iOS is plain stupid here. It seends event invitations with no Organizer.
// We check this corner-case and if MeetingStatus == 1 (see http://msdn.microsoft.com/en-us/library/ee219342(v=exchg.80).aspx or details)
// and there's no organizer, we fake one.
//
if ([o intValue] == 1 && ![theValues objectForKey: @"Organizer_Email"] && ![[[self organizer] rfc822Email] length])
{
iCalPerson *person;
@ -523,6 +523,20 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[person setPartStat: @"ACCEPTED"];
[self setOrganizer: person];
}
//
// When MeetingResponse fails Outlook still sends a new calendar entry with MeetingStatus=3.
// Use the organizer from the request if the event has no organizer.
//
if ([o intValue] == 3 && [theValues objectForKey: @"Organizer_Email"] && ![[[self organizer] rfc822Email] length])
{
iCalPerson *person;
person = [iCalPerson elementWithTag: @"organizer"];
[person setEmail: [theValues objectForKey: @"Organizer_Email"]];
[person setCn: [theValues objectForKey: @"Organizer_Name"]];
[person setPartStat: @"ACCEPTED"];
[self setOrganizer: person];
}
}

1
NEWS
View File

@ -10,6 +10,7 @@ Bug fixes
- EAS's GetItemEstimate/ItemOperations now support fetching mails and empty folders
- fixed some rare cornercases in multidomain configurations
- properly escape folder after creation using EAS (#3237)
- fixed potential organizer highjacking when using EAS (#3131)
2.3.0 (2015-06-01)
-------------------