-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: align TIME_MON variable's behavior #3306
Conversation
@M4tteoP could you review this PR? Thanks! |
There is a very interesting check result:
I tried this on my local environment (with a newer
@eduar-hte do you have any idea? |
It looks good to me! I just don't know how this change will be handled regarding breaking changes. Rules relying on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Seems like @gberkes solved the myth: The reason is why those checks have different results above that they have two different image: Thanks @gberkes. |
498be78
to
db7e4cb
Compare
|
Thanks for this fix (and @M4tteoP's report in the first case). It's a rare, but apparently a breaking change. Please report with care. And glad you settled on the ModSec 2 behavior. I see the attractiveness of Jan being "0", but it's really counterintuitive since we write dates differently. |
what
This PR changes
TIME_MON
variable's behavior and fixes #3305.Also fixes the regex in changed variable's test file (the old one allows any number, eg. 0 or 1111 which makes no sense; the new one allows between 1 and 12.).
why
As the issue describes in libmodsecurity3 the
TIME_MON
variable can be between 0 and 11. mod_security2 uses values between 1 and 12 - which is much more natural.references
See issue #3305.