mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Adds initial support to chained rules
This commit is contained in:
@@ -36,7 +36,9 @@ using actions::Action;
|
||||
Rule::Rule(Operator *_op,
|
||||
std::vector<Variable *> *_variables,
|
||||
std::vector<Action *> *_actions)
|
||||
: variables(_variables),
|
||||
: chained(false),
|
||||
chainedRule(NULL),
|
||||
variables(_variables),
|
||||
op(_op),
|
||||
rule_id(0),
|
||||
phase(-1) {
|
||||
@@ -111,6 +113,10 @@ bool Rule::evaluate(Assay *assay) {
|
||||
assay->debug(4, "Running action: " + a->action);
|
||||
a->evaluate(assay);
|
||||
}
|
||||
|
||||
if (this->chained && this->chainedRule != NULL) {
|
||||
this->chainedRule->evaluate(assay);
|
||||
}
|
||||
} else {
|
||||
assay->debug(4, "Rule returned 0.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user