Repository: collective/icalendar

Issue #197: parameters with binary values including =
Created: 2016-08-24T23:03:22Z
We currently do not support VEVENTS with binary (hex-encoded) parameter-values (ending in ==) like this:
BEGIN:VEVENT
DTSTART:20130416T100000Z
DTEND:20130416T110000Z
DTSTAMP:20130416T092616Z
UID:123
SUMMARY:wichtiger termin 1
X-APPLE-STRUCTURED-LOCATION;X-BINARY=abc==:geo:48.206686,16.363235
END:VEVENT

I'm not really sure that's allowed, I'll have to have a another look in the RFC, but I believe we should support it anyway, because Apple seems to produce those VEVENTs, see pimutils/khal#467

Duplicate issue #219: Support DQUOTE character in property parameter values
Created: 2017-03-16T15:47:56Z
Parsing this [apparently] valid file fails/crashes:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Apple Inc.//iOS 10.2.1//EN
VERSION:2.0
BEGIN:VTODO
COMPLETED:20170312T122019Z
CREATED:20170312T051318Z
DTSTAMP:20170312T122023Z
LAST-MODIFIED:20170312T122021Z
PERCENT-COMPLETE:100
PRIORITY:1
SEQUENCE:0
STATUS:COMPLETED
SUMMARY:Cosas en el freezer
UID:5ACD2904-D0CE-4097-BC75-C1EB95C0BB22
X-APPLE-SORT-ORDER:510988398
BEGIN:VALARM
ACKNOWLEDGED:20170312T122015Z
ACTION:DISPLAY
DESCRIPTION:Reminder
TRIGGER;VALUE=DATE-TIME:19760401T005545Z
UID:E13840A6-C30C-4BF0-A3E1-73EF27E34BD9
X-APPLE-PROXIMITY:ARRIVE
X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Ayacucho 983\\nPlata Baja 
 \"A\"\\nC1111AAC CABA\\nArgentina\\nArgentina;X-APPLE-ABUID="ab://Home";
 X-APPLE-RADIUS=0;X-APPLE-REFERENCEFRAME=1;X-TITLE=Home:geo:
 -34.597613,-58.395858
X-WR-ALARMUID:E13840A6-C30C-4BF0-A3E1-73EF27E34BD9
END:VALARM
END:VTODO
END:VCALENDAR

Traceback:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/icalendar/parser.py", line 241, in from_ical
    validate_param_value(v, quoted=False)
  File "/usr/lib/python3.6/site-packages/icalendar/parser.py", line 132, in validate_param_value
    raise ValueError(value)
ValueError: Ayacucho 983%5CnPlata Baja \"A\"%5CnC1111AAC CABA%5CnArgentina%5CnArgentina

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/icalendar/parser.py", line 336, in parts
    strict=self.strict)
  File "/usr/lib/python3.6/site-packages/icalendar/parser.py", line 255, in from_ical
    % (param, exc))
ValueError: 'X-ADDRESS=Ayacucho 983%5CnPlata Baja \\"A\\"%5CnC1111AAC CABA%5CnArgentina%5CnArgentina' is not a valid parameter string: Ayacucho 983%5CnPlata Baja \"A\"%5CnC1111AAC
 CABA%5CnArgentina%5CnArgentina

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/todoman/model.py", line 799, in update_cache
    todo = FileTodo.from_file(entry_path)
  File "/usr/lib/python3.6/site-packages/todoman/model.py", line 309, in from_file
    cal = icalendar.Calendar.from_ical(cal)
  File "/usr/lib/python3.6/site-packages/icalendar/cal.py", line 330, in from_ical
    name, params, vals = line.parts()
  File "/usr/lib/python3.6/site-packages/icalendar/parser.py", line 346, in parts
    % (self, exc)
ValueError: Content line could not be parsed into parts: 'X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Ayacucho 983\\nPlata Baja \"A\"\\nC1111AAC CABA\\nArgentina\\nArgentina;X-APPLE-ABUID="ab://Home";X-APPLE-RADIUS=0;X-APPLE-REFERENCEFRAME=1;X-TITLE=Home:geo:-34.597613,-58.395858': 'X-ADDRESS=Ayacucho 983%5CnPlata Baja \\"A\\"%5CnC1111AAC CABA%5CnArgen
tina%5CnArgentina' is not a valid parameter string: Ayacucho 983%5CnPlata Baja \"A\"%5CnC1111AAC CABA%5CnArgentina%5CnArgentina

Closing comment (2017-03-16T15:48:34Z): This may be related to #197, but I don't think this is binary data (is it?).