summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-01-05 10:08:14 +0100
committerJoas Schilling <coding@schilljs.com>2021-01-05 10:08:14 +0100
commit9fd2b6045d2ab613a9bf73dce50610da611be2ef (patch)
treef03c7ffdb29dec8aac5df8886a6d93dc09ba8178 /apps/dav
parent8d22ba4a33db99d3f20d6e582c922b55ff733786 (diff)
downloadnextcloud-server-9fd2b6045d2ab613a9bf73dce50610da611be2ef.tar.gz
nextcloud-server-9fd2b6045d2ab613a9bf73dce50610da611be2ef.zip
Don't throw a 500 when importing a broken ics reminder file
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index 688b4ce6107..9c27231cb8a 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -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