mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix tags not being populated in audit log when multiMatch is enabled
Fixes #2754.
This commit is contained in:
parent
dabf79eec2
commit
d3a6b6a6fd
@ -229,6 +229,9 @@ void RuleWithActions::executeActionsIndependentOfChainedRuleResult(Transaction *
|
|||||||
if (m_msg) {
|
if (m_msg) {
|
||||||
m_msg->evaluate(this, trans, ruleMessage);
|
m_msg->evaluate(this, trans, ruleMessage);
|
||||||
}
|
}
|
||||||
|
for (actions::Tag *a : m_actionsTag) {
|
||||||
|
a->evaluate(this, trans, ruleMessage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -253,14 +253,14 @@
|
|||||||
"body": ""
|
"body": ""
|
||||||
},
|
},
|
||||||
"expected": {
|
"expected": {
|
||||||
"audit_log": "\\[msg \"testmsg\"\\]",
|
"audit_log": "\\[msg \"testmsg\"\\] \\[data \"testdata\"\\] \\[severity \"7\"\\] \\[ver \"\"\\] \\[maturity \"0\"\\] \\[accuracy \"0\"\\] \\[tag \"testtag1\"\\] \\[tag \"testtag2\"\\]",
|
||||||
"error_log": "",
|
"error_log": "",
|
||||||
"http_code": 403
|
"http_code": 403
|
||||||
},
|
},
|
||||||
"rules": [
|
"rules": [
|
||||||
"SecRuleEngine On",
|
"SecRuleEngine On",
|
||||||
"SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"",
|
"SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"",
|
||||||
"SecRule ARGS \"@contains test2\" \"id:1557,phase:1,multiMatch,block,log,t:none,t:urlDecode,t:lowercase,msg:'testmsg'\"",
|
"SecRule ARGS \"@contains test2\" \"id:1557,phase:1,multiMatch,block,log,t:none,t:urlDecode,t:lowercase,msg:'testmsg',logdata:'testdata',severity:'DEBUG',tag:'testtag1',tag:'testtag2'\"",
|
||||||
"SecAuditEngine RelevantOnly",
|
"SecAuditEngine RelevantOnly",
|
||||||
"SecAuditLogParts ABCFHZ",
|
"SecAuditLogParts ABCFHZ",
|
||||||
"SecAuditLog /tmp/test/modsec_audit_multimatch_1.log",
|
"SecAuditLog /tmp/test/modsec_audit_multimatch_1.log",
|
||||||
@ -302,14 +302,14 @@
|
|||||||
"body": ""
|
"body": ""
|
||||||
},
|
},
|
||||||
"expected": {
|
"expected": {
|
||||||
"audit_log": "\\[msg \"tstmsg\"\\]",
|
"audit_log": "\\[msg \"testmsg\"\\] \\[data \"testdata\"\\] \\[severity \"7\"\\] \\[ver \"\"\\] \\[maturity \"0\"\\] \\[accuracy \"0\"\\] \\[tag \"testtag1\"\\] \\[tag \"testtag2\"\\]",
|
||||||
"error_log": "",
|
"error_log": "",
|
||||||
"http_code": 403
|
"http_code": 403
|
||||||
},
|
},
|
||||||
"rules": [
|
"rules": [
|
||||||
"SecRuleEngine On",
|
"SecRuleEngine On",
|
||||||
"SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"",
|
"SecDefaultAction \"phase:1,nolog,auditlog,deny,status:403\"",
|
||||||
"SecRule ARGS \"@streq tEst2\" \"id:1558,phase:1,multiMatch,block,log,t:none,t:trim,t:lowercase,msg:'tstmsg'\"",
|
"SecRule ARGS \"@streq tEst2\" \"id:1558,phase:1,multiMatch,block,log,t:none,t:trim,t:lowercase,msg:'testmsg',logdata:'testdata',severity:'DEBUG',tag:'testtag1',tag:'testtag2'\"",
|
||||||
"SecAuditEngine RelevantOnly",
|
"SecAuditEngine RelevantOnly",
|
||||||
"SecAuditLogParts ABCFHZ",
|
"SecAuditLogParts ABCFHZ",
|
||||||
"SecAuditLog /tmp/test/modsec_audit_multimatch_2.log",
|
"SecAuditLog /tmp/test/modsec_audit_multimatch_2.log",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user