]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't throw a 500 when importing a broken ics reminder file 24964/head
authorJoas Schilling <coding@schilljs.com>
Tue, 5 Jan 2021 09:08:14 +0000 (10:08 +0100)
committerJoas Schilling <coding@schilljs.com>
Tue, 5 Jan 2021 09:08:14 +0000 (10:08 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CalDAV/Reminder/ReminderService.php

index 688b4ce6107b4d4d4925da83761e1af34cd0f48a..9c27231cb8a4c8b4d6899c90f0bbdfc23193d9b1 100644 (file)
@@ -40,6 +40,7 @@ use OCP\IUserManager;
 use Sabre\VObject;
 use Sabre\VObject\Component\VAlarm;
 use Sabre\VObject\Component\VEvent;
+use Sabre\VObject\InvalidDataException;
 use Sabre\VObject\ParseException;
 use Sabre\VObject\Recur\EventIterator;
 use Sabre\VObject\Recur\NoInstancesException;
@@ -274,7 +275,11 @@ class ReminderService {
                                                continue;
                                        }
 
-                                       $triggerTime = $valarm->getEffectiveTriggerTime();
+                                       try {
+                                               $triggerTime = $valarm->getEffectiveTriggerTime();
+                                       } catch (InvalidDataException $e) {
+                                               continue;
+                                       }
 
                                        // If effective trigger time is in the past
                                        // just skip and generate for next event