Closed cuu508 closed 3 years ago
PS. I'm happy to try my hand at writing a PR for fixing each of the above.
If you can make the PR, yes a big thanks as i can't do it quickly for now, can you make them on https://github.com/kiorky/croniter ?
https://pypi.org/project/croniter/1.0.7/ is out, do we have something more to close this bug @cuu508 ? And, again, thanks a lot !
I'd like to, but haven't yet made a PR for the * * 10-l * *
and * * 10-L * *
inconsistency.
(I wanted to do each fix in a separate PR, but didn't want to do too many at the time, to not run into merge conflicts.)
Please proceed next then, :=)
Everything done here, afterall ?
Yes – thank you for reviewing and accepting these PRs!
I found a few cases where croniter accepts a malformed cron expression.
croniter accepts
1-1_0 * * * *
and interprets it as1-10 * * * *
When parsing range with a step, croniter uses int(), which accepts underscores for grouping digits.
croniter accepts
0-10/ * * * *
and interprets it as0-10/1 * * * *
The
step_search_re
allows for an empty step, and substitutes the empty step with "1"A slightly different problem: inconsist handling of lowercase and uppercase "L".
croniter accepts
* * 10-l * *
but rejects* * 10-L * *
.Perhaps it should convert the expression to lowercase as an early step during the parsing.