8000 Incorrect Regex in Rule 942440 Chained Matchvar · Issue #3287 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Incorrect Regex in Rule 942440 Chained Matchvar #3287

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

Closed
theMiddleBlue opened this issue Aug 25, 2023 · 3 comments
Closed

Incorrect Regex in Rule 942440 Chained Matchvar #3287

theMiddleBlue opened this issue Aug 25, 2023 · 3 comments
Assignees
Labels
🐛 bug Something isn't working PR available this issue is referenced by an active pull request

Comments

@theMiddleBlue
Copy link
Contributor

https://github.com/coreruleset/coreruleset/blob/v4.0/dev/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf#L1362

I've realized that there's an oversight in the regex used for the chained matchvar. At the time of implementation, I incorrectly set the range as written, but it should actually be A-Za-z to accurately capture the intended pattern.

I think the rx is working as expected just because the "-" between the two ranges is interpreted as literal hyphen. Am I wrong?

I'm going to assign this to me as a reminder for opening a PR to fix this.

@theMiddleBlue theMiddleBlue added the 🐛 bug Something isn't working label Aug 25, 2023
@theMiddleBlue theMiddleBlue self-assigned this Aug 25, 2023
@dune73
Copy link
Member
dune73 commented Aug 27, 2023

You are talking about A-Z-a-z? That's indeed wrong. But you repeat the - later in the regex so I think it gets ignored. Not 100% sure you can write -_, though. Should not it be _-`?

Also, when doing a PR, could you add a comment why we need the chained rule with the ey prefix.

@theMiddleBlue theMiddleBlue added the PR available this issue is referenced by an active pull request label Sep 1, 2023
@theMiddleBlue
Copy link
Contributor Author

fixed here: #3290

@theseion
Copy link
Contributor

This issue has been fixed in #3290.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working PR available this issue is referenced by an active pull request
Projects
None yet
Development

No branches or pull requests

3 participants
0