Skip to content

rx:exit after full match; fix TX population after unused group #2348

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

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Conversation

martinhsv
Copy link
Contributor

This pull request includes a functionality change to stop analyzing a string after a first full match. In other words, additional full matches will no longer be scanned for like the /g flag does.

@martinhsv martinhsv linked an issue Jun 29, 2020 that may be closed by this pull request
@martinhsv martinhsv merged commit 0eb3c12 into owasp-modsecurity:v3/master Jul 6, 2020
},
"rules":[
"SecRuleEngine On",
"SecRule ARGS \"@rx (aa)(bb|cc)?(dd)\" \"id:1,log,pass,capture,id:16\"",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick note: I assume this is just a typo, but surprising that a rule has two (different) id, and the engine allows that.

Also wanted to check the regression tests result, but there isn't any CI output. Did you merge this patch without that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes there should not be two instances of id. I believe that happened because the preexisting tests in the file likewise had that, and I cut-and-pasted from there as a starting point. Obviously an oversight on my part that I did not notice it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and I cut-and-pasted from there as a starting point - sure, it's no problem, we're humans :).

But why the libmodsecurity3 allows this? And where it the regression test output?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the regression tests are available on travis-ci. There is a build for every commit. The history is available here: https://travis-ci.org/github/SpiderLabs/ModSecurity. That link is also available on the project description.

The checking is disabled on v3/master as a consequence of the development towards 3.1 as described here:
v3.1 Project

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not get data in group when using regular expression.
3 participants