Fix chained rules execution order

This commit is contained in:
Felipe Zimmerle 2016-02-10 14:29:45 -03:00
parent 8143f8ea89
commit 4bdb4ed63a

View File

@ -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);
}
}
}