mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-17 14:46:13 +03:00
Cosmetics on top of: #1636
This commit is contained in:
parent
a0bea7356d
commit
4ac14a2622
@ -152,8 +152,6 @@ std::string Rules::getParserError() {
|
|||||||
|
|
||||||
|
|
||||||
int Rules::evaluate(int phase, Transaction *transaction) {
|
int Rules::evaluate(int phase, Transaction *transaction) {
|
||||||
bool remove_rule;
|
|
||||||
|
|
||||||
if (phase > modsecurity::Phases::NUMBER_OF_PHASES) {
|
if (phase > modsecurity::Phases::NUMBER_OF_PHASES) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -180,7 +178,6 @@ int Rules::evaluate(int phase, Transaction *transaction) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < rules.size(); i++) {
|
for (int i = 0; i < rules.size(); i++) {
|
||||||
remove_rule = false;
|
|
||||||
Rule *rule = rules[i];
|
Rule *rule = rules[i];
|
||||||
if (transaction->m_marker.empty() == false) {
|
if (transaction->m_marker.empty() == false) {
|
||||||
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
||||||
@ -206,6 +203,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
|
|||||||
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
debug(9, "Skipped rule id '" + std::to_string(rule->m_ruleId) \
|
||||||
+ "'. Removed by an SecRuleRemove directive.");
|
+ "'. Removed by an SecRuleRemove directive.");
|
||||||
} else {
|
} else {
|
||||||
|
bool remove_rule = false;
|
||||||
if (m_exceptions.m_remove_rule_by_msg.empty() == false) {
|
if (m_exceptions.m_remove_rule_by_msg.empty() == false) {
|
||||||
for (auto &z : m_exceptions.m_remove_rule_by_msg) {
|
for (auto &z : m_exceptions.m_remove_rule_by_msg) {
|
||||||
if (rule->containsMsg(z, transaction) == true) {
|
if (rule->containsMsg(z, transaction) == true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user