awesomemotive / sugarcalendar-icalendar-rrule-sequencer

Parse an iCalendar RRULE into an array of dtstart, dtend, sequence, and recurrence-id attributes
GNU General Public License v3.0
1 stars 3 forks source link

Numeric `wkst` causes infinite loop #1

Open JJJ opened 2 years ago

JJJ commented 2 years ago

The validate_args() method will get hung up in an infinite loop if instead of a properly formed SU type iCal formatted day string is passed, an integer is passed instead.

In WordPress (Sugar Calendar specifically) this is somewhat of an easy mistake to make, as it stores the "start of week" value using the PHP numeric representation – not the iCalendar representation.

Fatal error: Maximum execution time of 30 seconds exceeded in /wp-content/plugins/sugar-calendar/sugar-calendar/includes/classes/utilities/ical-rrule-sequencer.php on line 927

PR imminent.