mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix chained rules execution order
This commit is contained in:
parent
8143f8ea89
commit
4bdb4ed63a
14
src/rule.cc
14
src/rule.cc
@ -397,13 +397,7 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
|
||||
for (Action *a :
|
||||
this->actions_runtime_pos) {
|
||||
if (a->isDisruptive() == false) {
|
||||
#ifndef NO_LOGS
|
||||
trasn->debug(4, "Running (_non_ disruptive) " \
|
||||
"action: " + a->action);
|
||||
#endif
|
||||
a->evaluate(this, trasn, ruleMessage);
|
||||
} else {
|
||||
if (a->isDisruptive() == true) {
|
||||
containsDisruptive = true;
|
||||
}
|
||||
}
|
||||
@ -496,6 +490,12 @@ bool Rule::evaluate(Transaction *trasn) {
|
||||
"Not running disruptive action: " + \
|
||||
a->action + ". SecRuleEngine is not On");
|
||||
#endif
|
||||
} else if (!a->isDisruptive()) {
|
||||
#ifndef NO_LOGS
|
||||
trasn->debug(4, "Running (_non_ disruptive) " \
|
||||
"action: " + a->action);
|
||||
#endif
|
||||
a->evaluate(this, trasn, ruleMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user