mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 02:40:35 +03:00
Refactoring: Splits Rule into Rule and RuleWithActions
This commit is contained in:
@@ -40,7 +40,7 @@ bool SetVar::init(std::string *error) {
|
||||
}
|
||||
|
||||
|
||||
bool SetVar::evaluate(Rule *rule, Transaction *t) {
|
||||
bool SetVar::evaluate(RuleWithActions *rule, Transaction *t) {
|
||||
std::string targetValue;
|
||||
std::string resolvedPre;
|
||||
|
||||
@@ -112,7 +112,8 @@ bool SetVar::evaluate(Rule *rule, Transaction *t) {
|
||||
|
||||
try {
|
||||
std::vector<const VariableValue *> l;
|
||||
m_variable->evaluate(t, rule, &l);
|
||||
Rule *rr = dynamic_cast<Rule *>(rule);
|
||||
m_variable->evaluate(t, rr, &l);
|
||||
if (l.size() == 0) {
|
||||
value = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user