summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2021-01-05 12:57:00 +0100
committerGitHub <noreply@github.com>2021-01-05 12:57:00 +0100
commit50b380e85b46f37de3612e4aa077726e8da94d01 (patch)
treea5845b4dd1c71938a92a01f06dcad9bc0b137b4e /apps/dav/lib/CalDAV
parent39c67d9868d15fa42031b8bafebc6bc05eac867e (diff)
parent9fd2b6045d2ab613a9bf73dce50610da611be2ef (diff)
downloadnextcloud-server-50b380e85b46f37de3612e4aa077726e8da94d01.tar.gz
nextcloud-server-50b380e85b46f37de3612e4aa077726e8da94d01.zip
Merge pull request #24964 from nextcloud/bugfix/noid/internal-server-error-when-importing-broken-ics-file
Don't throw a 500 when importing a broken ics reminder file
Diffstat (limited to 'apps/dav/lib/CalDAV')
-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