-
-
Notifications
You must be signed in to change notification settings - Fork 402
False negative in 942230 #2230
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
Comments
Good catch @NiceYouKnow thanks!
maybe I'm missing something |
I am just peering through this issue, but in MySQL, the syntax for the CASE operator is different. The example would be correct as:
However, I don't know how other SQL dialects allow this. What servers accept your notation? |
@NiceYouKnow are you still interested in this? Could you respond to @lifeforms' question? |
Your example is correct, no problem. But my question is about |
Nice catch @NiceYouKnow. The exact query syntax isn't relevant. The issue is that by the rule could be circumvented by using a number > 9 in the comparison. I've moved the four statements into a new regex data file. I also adjusted the fourth rule to fix the false negative (test included) and removed the unnecessary character class still left in the original suggestion ( |
Describe the bug
This is the regularity of 942230:
It can be split into four independent rules:
My question is that there may be a risk of missing the attack on the fourth rule.
Below are two payloads of the same type:
You can check the test in https://regex101.com/r/h9Vz4I/2, the regular rule only hits the first payload, but not the second payload.
So my suggestion for modification is:
Remove
\d
, because\w
already contains it.The modification effect can be viewed https://regex101.com/r/k0G4Ux/1/
Steps to reproduce
Expected behaviour
Actual behaviour
Additional context
Your Environment
CRS version v3.4/dev
The text was updated successfully, but these errors were encountered: