Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling between() on a Rrule with malformed dtstart hangs. #281

Closed
ghost opened this issue Sep 19, 2018 · 0 comments
Closed

Calling between() on a Rrule with malformed dtstart hangs. #281

ghost opened this issue Sep 19, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2018

The following code will make rrule hang (enter infinite loop i guess):

    const dateISO = undefined;
    const rRule = '';
    const rruleOptions = rrule.RRule.parseString(rRule);

    rruleOptions.dtstart = new Date(dateISO);
    const rrule = new rrule.RRule(rruleOptions);

    const ruleDates = rRule.between(afterDate, beforeDate, true);

Basically the code is, if somehow you have an rrule with a malformed dtstart, between() execution will hang somewhere in the execution of _iter() as its var date value is:

{
day: NaN
hour: NaN
millisecond: 0
minute: NaN
month: NaN
second: NaN
year: NaN
} 

EDIT: noticed after submitting that there is a PR (#62) that seems to address this

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

No branches or pull requests

0 participants