Skip to content

fix: infinite loops in iter when interval is undefined#494

Open
theninadoge wants to merge 1 commit into
jkbrzt:masterfrom
theninadoge:fix-infinite-loop-when-interval-undefined
Open

fix: infinite loops in iter when interval is undefined#494
theninadoge wants to merge 1 commit into
jkbrzt:masterfrom
theninadoge:fix-infinite-loop-when-interval-undefined

Conversation

@theninadoge

Copy link
Copy Markdown

This fixes the issue described in #481.

The issue can be reproduced by create an rrule with an interval of undefined or null (overwriting the default 1), and then calling after, between, before

iCalendar RFC states that interval should be a positive integer, so this fix ensures that if not present interval is set back to the default of 1.


Thanks for contributing to rrule!

To submit a pull request, please verify that you have done the following:

  • Merged in or rebased on the latest master commit
  • Linked to an existing bug or issue describing the bug or feature you're
    addressing
  • Written one or more tests showing that your change works as advertised

ThomasMayor added a commit to agendach/rrule that referenced this pull request Apr 24, 2026
Prevents infinite loop in iter when callers spread options objects where
interval can be undefined at runtime (e.g. { ...opts, interval: form.val }
where form.val is unset). RFC 5545 specifies interval as a positive
integer, so default to 1 if missing.

Cherry-pick of jkbrzt#494
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.

1 participant