@@ -229,13 +229,6 @@ public function handleIMipMessage(string $name, string $calendarData): void {
229229 } catch (ParseException $ e ) {
230230 throw new CalendarException ('iMip message could not be processed because an error occurred while parsing the iMip message ' , 0 , $ e );
231231 }
232- // Determine mode base on message source
233- $ mode = null ;
234- if (isset ($ vObject ->PRODID )) {
235- if ($ vObject ->PRODID ->getValue () === 'Microsoft Exchange Server 2010 ' ) {
236- $ mode = 'EX2010 ' ;
237- }
238- }
239232 // validate the iMip message
240233 if (!isset ($ vObject ->METHOD )) {
241234 throw new CalendarException ('iMip message contains no valid method ' );
@@ -246,7 +239,7 @@ public function handleIMipMessage(string $name, string $calendarData): void {
246239 if (!isset ($ vObject ->VEVENT ->UID )) {
247240 throw new CalendarException ('iMip message event dose not contain a UID ' );
248241 }
249- if ($ mode !== ' EX2010 ' && !isset ($ vObject ->VEVENT ->ORGANIZER )) {
242+ if (!isset ($ vObject ->VEVENT ->ORGANIZER )) {
250243 throw new CalendarException ('iMip message event dose not contain an organizer ' );
251244 }
252245 if (!isset ($ vObject ->VEVENT ->ATTENDEE )) {
@@ -273,22 +266,15 @@ public function handleIMipMessage(string $name, string $calendarData): void {
273266 if (in_array ($ imipMethod , ['REPLY ' , 'REFRESH ' ], true )) {
274267 // extract sender (REPLY and REFRESH method should only have one attendee)
275268 $ sender = strtolower ($ vObject ->VEVENT ->ATTENDEE ->getValue ());
276- // fix Microsoft Exchange Server 2010 reply quirk
277- if ($ mode === 'EX2010 ' && $ imipMethod === 'REPLY ' ) {
278- $ recipient = $ userAddress ;
279- }
280269 // extract and verify the recipient
281- if ($ mode === null ) {
282- $ recipient = strtolower ($ vObject ->VEVENT ->ORGANIZER ->getValue ());
283-
284- if (!in_array ($ recipient , $ userAddresses , true )) {
285- throw new CalendarException ('iMip message dose not contain an organizer that matches the user ' );
286- }
287- // if the recipient address is not the same as the user address this means an alias was used
288- // the iTip broker uses the users primary email address during processing
289- if ($ userAddress !== $ recipient ) {
290- $ recipient = $ userAddress ;
291- }
270+ $ recipient = strtolower ($ vObject ->VEVENT ->ORGANIZER ->getValue ());
271+ if (!in_array ($ recipient , $ userAddresses , true )) {
272+ throw new CalendarException ('iMip message dose not contain an organizer that matches the user ' );
273+ }
274+ // if the recipient address is not the same as the user address this means an alias was used
275+ // the iTip broker uses the users primary email address during processing
276+ if ($ userAddress !== $ recipient ) {
277+ $ recipient = $ userAddress ;
292278 }
293279 } elseif (in_array ($ imipMethod , ['PUBLISH ' , 'REQUEST ' , 'ADD ' , 'CANCEL ' ], true )) {
294280 // extract sender
0 commit comments