Merge pull request #32191 from nextcloud/handle-calendar-reminders-with-infinite-recurrence

Handle processing reminders for calendar objects with an infinite number of recurrences
This commit is contained in:
blizzz 2022-04-28 13:01:13 +02:00 committed by GitHub
commit 8342964db0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,7 @@ use Sabre\VObject\Component\VEvent;
use Sabre\VObject\InvalidDataException;
use Sabre\VObject\ParseException;
use Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Recur\MaxInstancesExceededException;
use Sabre\VObject\Recur\NoInstancesException;
use function strcasecmp;
@ -247,6 +248,10 @@ class ReminderService {
// instance. We are skipping this event from the output
// entirely.
return;
} catch (MaxInstancesExceededException $e) {
// The event has more than 3500 recurring-instances
// so we can ignore it
return;
}
while ($iterator->valid() && count($processedAlarms) < count($masterAlarms)) {