-
-
Notifications
You must be signed in to change notification settings - Fork 404
refactor(942340): move to regex assembly #4014
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
Conversation
f062144
to
11745f0
Compare
📊 Quantitative test results for language: |
11745f0
to
903aba3
Compare
4be97c9
to
f419b0e
Compare
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.
The updated regex differs significantly from the original.
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.
Ignore my last review. I was looking at an older version. I'll have to take some time to analyse the updated expression.
e422d2c
to
1b278f9
Compare
242631d
to
587185d
Compare
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.
There might be more of these small differences. Don't have the time right now to find them all.
8d4a6f3
to
40ed9f0
Compare
I've used the following to validate (formatting is not consistent but so as to make it easy to spot differences).
Updated:
As you can see, there is (should be) only one major change, where grouping was optimised for expressions with the "quotes + spaces" prefix. |
I believe it's good to go. Let me know if you're happy as well. |
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com> Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
6f45fed
to
9fce961
Compare
@theseion Can you reapprove so we merge? |
what
In this process, there are some small semantic changes:
optional spacesthis will be in a followup PR (maybe we need to add some docs on this decision?)\s*?
are just changed to\s*
, like we do in other regexeslogical
andsql
quotes are also consolidated and expanded from onlythis will be in a followup PR['"]
to['"```]
(don't know how to escape the backtick in gh markdown)tests
To make some sense from this rule, I'm adding here the test payloads so we can figure it out what it should be matching, add more, etc. (you can get these using:
yq e '.tests[] | .stages[] | .input | (.uri, .data)' tests/regression/tests/REQUEST-942-APPLICATION-ATTACK-SQLI/942340.yaml
)See https://regex101.com/r/2Kn3mc/1
changesadded more operators (followup PR->
,*
,/
), or things are easy to bypasscouldn't find any database that has something calledxxor
?