Open Sharparam opened 5 years ago
Do you have some ics text that demonstrates the bug?
Any RRULE string where data comes before the FREQ property will have that data stripped.
In the first one where FREQ is first, COUNT is parsed correctly. In the second one where COUNT comes before FREQ, it is being ignored and set to the default value.
There is an issue when parsing an RRULE string that does not begin with "FREQ". The current parser extracts the first occurrence of "FREQ" and everything following it, meaning that any properties that occurred before the first "FREQ" are ignored.
This is not according to RFC 5545, which states that "The rule parts are not ordered in any particular sequence.".
The problem starts with this regex pattern:
https://github.com/rianjs/ical.net/blob/master/net-core/Ical.Net/Serialization/DataTypes/RecurrencePatternSerializer.cs#L196