When providing two or more zeros as step in a cron expression (e.g. */00 0 * * *), cron runs into an infinite loop instead of throwing an "Invalid step" error.
Expected Behavior
should throw an "Invalid step" error when providing any number of zeros as a step.
Actual Behavior
does not detect the step is invalid, and runs into a blocking infinite loop (even when not starting the job).
Possible Fix
No response
Steps to Reproduce
new CronJob('* * * 1/00 *', function () {
console.log('tick');
});
Context
found this bug while adding fuzz tests (as part of #715)
Description
When providing two or more zeros as step in a cron expression (e.g.
*/00 0 * * *
),cron
runs into an infinite loop instead of throwing an "Invalid step" error.Expected Behavior
should throw an "Invalid step" error when providing any number of zeros as a step.
Actual Behavior
does not detect the step is invalid, and runs into a blocking infinite loop (even when not starting the job).
Possible Fix
No response
Steps to Reproduce
Context
found this bug while adding fuzz tests (as part of #715)
Your Environment
cron
version:3.1.3
18.17.1
Ubuntu 22.04.3