Skip to content
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 meta-actions not being applied if multiMatch is enabled in the chain starter rule #2868

Merged

Conversation

mlevogiannis
Copy link
Contributor

@mlevogiannis mlevogiannis commented Jan 20, 2023

Fixes #2867.

(This PR will be marked as ready after #2866 is merged and the new regression tests are updated to also check for the tags in the audit log.)

@mlevogiannis mlevogiannis changed the title Fix meta-actions not being applied in the chain starter rule if multiMatch is enabled Fix meta-actions not being applied if multiMatch is enabled in the chain starter rule Jan 20, 2023
@mlevogiannis mlevogiannis marked this pull request as ready for review April 25, 2023 18:29
@martinhsv martinhsv added this to QA in v3.0.10 Apr 26, 2023
@martinhsv
Copy link
Contributor

@mlevogiannis

I agree with this change. It successfully brings the output closer to what users' reasonable expectations likely are. (There are still some oddities with chain combined with multiMatch, but this PR doesn't appear to make any of those things worse.)

The only thing that really ought to be changed with this PR is in the automated test: it would be better if each SecRule in the same chain appears on its own line. It's easier to read that way -- not to mention making it more consistent with other examples that use 'chain' in the automated test suite.

…ain starter rule

Meta-actions can only be used in non-chained rules or in the chain starter
rule of a rule chain. The m_chainedRuleParent member of the RuleWithActions
class is NULL only if the rule is not chained or if it is the chain starter
rule of a rule chain.

Fixes owasp-modsecurity#2867.
@mlevogiannis
Copy link
Contributor Author

@martinhsv Fixed.

@martinhsv martinhsv merged commit 4050c84 into owasp-modsecurity:v3/master Apr 27, 2023
@martinhsv martinhsv moved this from QA to Done in v3.0.10 Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Meta-actions are not applied if multiMatch is enabled in the chain starter rule
2 participants