mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Adds support to SecRuleRemoveByMsg
This commit is contained in:
@@ -208,6 +208,13 @@ int Rules::evaluate(int phase, Transaction *transaction) {
|
||||
} else if (m_exceptions.contains(rule->m_ruleId)) {
|
||||
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
||||
+ "'. Removed by an SecRuleRemove directive.");
|
||||
} else if (m_exceptions.m_remove_rule_by_msg.empty() == false) {
|
||||
for (auto &z : m_exceptions.m_remove_rule_by_msg) {
|
||||
if (rule->containsMsg(z, transaction) == true) {
|
||||
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
||||
+ "'. Removed by a SecRuleRemoveByMsg directive.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rule->evaluate(transaction, NULL);
|
||||
if (transaction->m_it.disruptive == true) {
|
||||
|
Reference in New Issue
Block a user