harrisiirak / cron-parser

Node.js library for parsing crontab instructions
MIT License
1.32k stars 156 forks source link

Should validate repeat string baisc format #262

Closed zangguodong closed 1 year ago

zangguodong commented 2 years ago

https://github.com/harrisiirak/cron-parser/blob/f687555f25ff0e4e12a951f3a4827b382436692f/lib/expression.js#L275

Due to not providing basic repeat atomic format validation, cron-parser sees format like 10 16/17/18 * * * as valid, and parse it as 10 16/17 * * *. But 16/17/18 should not be correct format, isn't it?

image
harrisiirak commented 2 years ago

@zangguodong thanks for reporting this! It should throw an error indeed as it's in an invalid format.