mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +00:00
(fix) avoid exceptions for RRULE with no DTSTART
This commit is contained in:
1
NEWS
1
NEWS
@@ -20,6 +20,7 @@ Bug fixes
|
||||
- [core] honor IMAPLoginFieldName also when setting IMAP ACLs
|
||||
- [core] honor groups when setting IMAP ACLs
|
||||
- [core] honor "any authenticated user" when setting IMAP ACLs
|
||||
- [core] avoid exceptions for RRULE with no DTSTART
|
||||
|
||||
4.0.8 (2019-07-19)
|
||||
------------------
|
||||
|
||||
@@ -69,6 +69,10 @@
|
||||
dayMask = nil;
|
||||
repeatCount = 0;
|
||||
|
||||
if (!firstRange)
|
||||
// Can happen when event/todo has a rrule with no dtstart
|
||||
return nil;
|
||||
|
||||
if ([endDate compare: firStart] == NSOrderedAscending)
|
||||
// Range ends before first occurrence
|
||||
return nil;
|
||||
|
||||
@@ -79,6 +79,10 @@
|
||||
repeatCount = 0;
|
||||
hasRepeatCount = [rrule hasRepeatCount];
|
||||
|
||||
if (!firstRange)
|
||||
// Can happen when event/todo has a rrule with no dtstart
|
||||
return nil;
|
||||
|
||||
if ([endDate compare: firStart] == NSOrderedAscending)
|
||||
// Range ends before first occurrence
|
||||
return nil;
|
||||
|
||||
@@ -59,7 +59,11 @@
|
||||
repeatCount = 0;
|
||||
count = 0;
|
||||
referenceDate = nil;
|
||||
|
||||
|
||||
if (!firstRange)
|
||||
// Can happen when event/todo has a rrule with no dtstart
|
||||
return nil;
|
||||
|
||||
if ([rEnd compare: firStart] == NSOrderedAscending)
|
||||
// Range ends before first occurrence
|
||||
return nil;
|
||||
|
||||
@@ -1100,6 +1100,12 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
endDate = [(iCalToDo*) component due];
|
||||
}
|
||||
|
||||
if (![master startDate])
|
||||
{
|
||||
[self errorWithFormat: @"ignored component with no DTSTART"];
|
||||
return;
|
||||
}
|
||||
|
||||
delta = [masterEndDate timeIntervalSinceDate: [master startDate]];
|
||||
recurrenceIdRange = [NGCalendarDateRange calendarDateRangeWithStartDate: recurrenceId
|
||||
endDate: [recurrenceId dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds: delta]];
|
||||
|
||||
Reference in New Issue
Block a user