libvcalendar.php does not handle VEVENTS with a start date but no end date or duration
Hi,
Found this with the caldav feature, but not sure if it should really go in kolab bugzilla...
I notice when using the caldav back end against my radicale server these in the roundcube log:
[24-Mar-2015 15:59:59 +0000]: PHP Error: iCal data parse error: Object validation failed: missing mandatory object properties in /var/www/localhost/htdocs/roundcube1x/plugins/libcalendaring/libvcalendar.php on line 153 (POST /roundcube1x/?_task=calendar&_action=event?_task=&_action=)
I have tracked this down to VEVENTs in my calendar that have a DTSTART but no DTEND.
This check in libvcalendar.php is raising this error:
// minimal validation
if (empty($event['uid']) || ($event['_type'] == 'event' && empty($event['start']) != empty($event['end']))) {
example event:
BEGIN:VEVENT DTSTART:20120710T230000Z DTSTAMP:20121010T112105Z SEQUENCE:1349868065 SUMMARY:test appt UID:-CALENDAR-ROY-0000001055 EXDATE: X-RADICALE-NAME:-CALENDAR-ROY-0000001055.ics END:VEVENT
My reading of RFC 5545 leads me to believe DTEND is optional in this case, from here:
3.6.1. Event Component
....
For cases where a "VEVENT" calendar component
specifies a "DTSTART" property with a DATE-TIME value type but no
"DTEND" property, the event ends on the same calendar date and
time of day specified by the "DTSTART" property.
It looks like there should be a check for the scenario where DTSTART is a datetime and there is no DTEND or DURATION and then set end to the same value as start.
Roy