(fix) prevent characters in calendar component UID causing issues during import process
parent
fdb36970d4
commit
d51d5c85b0
1
NEWS
1
NEWS
|
@ -13,6 +13,7 @@ Bug fixes
|
|||
- EAS fix for wrong charset being used (#3392)
|
||||
- EAS fix on qp-encoded subjects (#3390)
|
||||
- correctly handle all-day event exceptions when the master event changes
|
||||
- prevent characters in calendar component UID causing issues during import process
|
||||
|
||||
2.3.3a (2015-11-18)
|
||||
-------------------
|
||||
|
|
|
@ -3160,10 +3160,19 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
|||
NSMutableString *content;
|
||||
NSString *uid;
|
||||
|
||||
// We first look if there's an event with the same UID in our calendar. If not,
|
||||
// let's reuse what is in the event, otherwise generate a new GUID and use it.
|
||||
// We first look if the event has any / or + in its UID. If that's the case
|
||||
// we generate a new UID based on a GUID
|
||||
uid = [event uid];
|
||||
|
||||
if ([uid rangeOfCharacterFromSet: [NSCharacterSet characterSetWithCharactersInString: @"+/"]].location != NSNotFound)
|
||||
{
|
||||
uid = [self globallyUniqueObjectId];
|
||||
[event setUid: uid];
|
||||
}
|
||||
else
|
||||
{
|
||||
// We also look if there's an event with the same UID in our calendar. If not,
|
||||
// let's reuse what is in the event, otherwise generate a new GUID and use it.
|
||||
object = [self lookupName: uid
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
|
@ -3173,6 +3182,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
|||
uid = [self globallyUniqueObjectId];
|
||||
[event setUid: uid];
|
||||
}
|
||||
}
|
||||
|
||||
object = [SOGoAppointmentObject objectWithName: uid
|
||||
inContainer: self];
|
||||
|
|
Loading…
Reference in New Issue