Importing events from an iCalendar file fails when the filename contains a string of the form %dd, where dd are two hexadecimal digits. Judging from the error message that appears, Lightning wrongly attempts to URL-decode the filename, replacing such strings with ASCII characters. For example, if you tell Lightning to open a file named %41.ics, it instead attempts to open a file named A.ics.
Steps to reproduce:
- Create a valid iCalender file named /tmp/%41.ics
- In Thunderbird, go to Events and Tasks->Import and open the aforementioned file.
- The event does not get imported. Instead, following error dialog appears:
Unable to read from file:/tmp/A.ics
[Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFileInputStream.init]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://calendar/content/import-export.js :: loadEventsFromFile/< :: line 86" data: no]
- The event should have been imported.
It should be noted that such filenames are not unheard of in the wild. For example, the popular online service Meetup distributes iCalendar files whose filenames are URL-encoded—today I received a one whose name was Meetup+%232%3A+Sentiment+Analysis.ics, and of course Lightning refused to open it.
Note: Thunderbird is reporting my Lightning version as 6.2.7, but this version is not listed in the Version field of this Bugzilla instance.