Page MenuHomePhorge

libcalendaring rejects VEVENTs without DTEND in certain cases
Closed, ResolvedPublic

Description

According to RFC5545 Section 3.6.1, a VEVENT may lack the DTEND property even if no DURATION was given.

Currently, however, libcalendaring only deals with this case if DTSTART is a DATE (i.e. an all-day event) and not a DATE-TIME value. In the latter case, the end date-time is specified to be the same as the start date-time (see RFC).

I think this can be easily fixed with the following patch:

--- /usr/share/roundcubemail/plugins/libcalendaring/libvcalendar.php.orig       2016-07-28 10:52:26.210804660 +0200
+++ /usr/share/roundcubemail/plugins/libcalendaring/libvcalendar.php    2016-07-28 10:58:41.021331258 +0200
@@ -591,8 +591,8 @@
                 $event['allday'] = true;
             }
 
-            // all-day events may lack the DTEND property
-            if ($event['allday'] && empty($event['end'])) {
+            // all events may lack the DTEND property (see https://tools.ietf.org/html/rfc5545#section-3.6.1)
+            if (empty($event['end'])) {
                 $event['end'] = clone $event['start'];
             }
             // shift end-date by one day (except Thunderbird)

Details

Ticket Type
Task