Skip to content

Conversation

@timsu
Copy link

@timsu timsu commented Jan 24, 2021

We've seen a number of errors in Outlook-generated ICS files in the wild. This PR adds a few fixes to make the parser more flexible:

  • simple fix to support multiple exceptions in EXDATE
  • add an options field with a flag to ignore_errors when deserializing to skip events with errors
  • simple parsing for custom timezones. this doesn't parse VTIMEZONE properly but at least prevents a crash

@lpil
Copy link
Owner

lpil commented Jan 24, 2021

This approach seems somewhat heavy-handed to me. Is there a particular kind of error that is expected?

@timsu
Copy link
Author

timsu commented Jan 27, 2021

Are you talking about ignore_errors, or custom timezones parsing? The custom timezones I agree it's not great, the ideal would be to actually interpret VTIMEZONE properly. I can remove that part of the handling if you'd like.

This comes from crashes we've seen trying to parse user ics files, mostly generated by Outlook 365. I can also attach some samples if that's helpful.

@lpil
Copy link
Owner

lpil commented Jan 27, 2021

The ignoring of errors part. I would much rather handle it without swallowing exceptions. Is there a particular bit that is expected to fail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants