tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.06k stars 524 forks source link

Trailing semicolon throw ParserErrors when importing events #7700

Open kib42 opened 2 weeks ago

kib42 commented 2 weeks ago

A trailing semicolon in the "RRULE" lines caused ParserErrors:

"RRULE is not an object could not parse property name: null"

A trailing semicolon on other property lines could also throw these errors.

Example ics file:

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
CREATED:20241003T153559Z
LAST-MODIFIED:20240504T095630Z
DTSTAMP:20241003T153559Z
DTSTART;TZID=Europe/Berlin:20241002T094500
DTEND;TZID=Europe/Berlin:20241002T111500
RRULE:FREQ=WEEKLY;UNTIL=20250122T094500;INTERVAL=1;
EXDATE;TZID=Europe/Berlin:20241120T094500
EXDATE;TZID=Europe/Berlin:20241225T094500
EXDATE;TZID=Europe/Berlin:20250101T094500
DESCRIPTION;LANGUAGE=de:Vorlesung
SUMMARY;LANGUAGE=de:V: Mathematik
END:VEVENT
END:VCALENDAR
andrehgdias commented 2 weeks ago

That's in fact an error with the iCal file. A property line should not end with a ; unless its a multi-line property.

Invalid example:

RRULE:FREQ=WEEKLY;UNTIL=20250122T094500;INTERVAL=1;

Valid multi-line example:

RRULE:FREQ=WEEKLY;UNTIL=20250122T094500;
    INTERVAL=1;

We could look into it at some point and try modifying the parser to handle this error...

murilopereirame commented 2 weeks ago

That's in fact an error with the iCal file. A property line should not end with a ; unless its a multi-line property.

Invalid example:

RRULE:FREQ=WEEKLY;UNTIL=20250122T094500;INTERVAL=1;

Valid multi-line example:

RRULE:FREQ=WEEKLY;UNTIL=20250122T094500;
    INTERVAL=1;

We could look into it at some point and try modifying the parser to handle this error...

Other applications can handle this, so it would be nice if we could remove the trailing semicolons