From 9eb64d39db71f60a06ad4d14c6aa3ed68616b574 Mon Sep 17 00:00:00 2001 From: Micha Date: Mon, 15 Jun 2026 02:28:09 +0200 Subject: [PATCH] fix: return 403 on NoInstancesException --- lib/CalDAV/Backend/PDO.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/CalDAV/Backend/PDO.php b/lib/CalDAV/Backend/PDO.php index 528fba3473..5750adb316 100644 --- a/lib/CalDAV/Backend/PDO.php +++ b/lib/CalDAV/Backend/PDO.php @@ -661,7 +661,11 @@ protected function getDenormalizedData($calendarData) $lastOccurence = $firstOccurence; } } else { - $it = new VObject\Recur\EventIterator($vObject, (string) $component->UID); + try { + $it = new VObject\Recur\EventIterator($vObject, (string) $component->UID); + } catch (VObject\Recur\NoInstancesException $e) { + throw new Forbidden($e->getMessage()); + } $maxDate = new \DateTime(self::MAX_DATE); if ($it->isInfinite()) { $lastOccurence = $maxDate->getTimeStamp();