mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Refactoring on the RULE variable
This commit is contained in:
@@ -33,8 +33,6 @@ bool LogData::evaluate(Rule *rule, Transaction *transaction,
|
||||
std::shared_ptr<RuleMessage> rm) {
|
||||
rm->m_data = data(transaction);
|
||||
|
||||
transaction->m_variableRule.set("logdata", rm->m_data, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -54,8 +54,6 @@ bool Msg::evaluate(Rule *rule, Transaction *transaction,
|
||||
transaction->debug(9, "Saving msg: " + msg);
|
||||
#endif
|
||||
|
||||
transaction->m_variableRule.set("msg", msg, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,7 @@ bool SetVar::evaluate(Rule *rule, Transaction *t) {
|
||||
std::string resolvedPre;
|
||||
|
||||
if (m_string) {
|
||||
resolvedPre = m_string->evaluate(t);
|
||||
resolvedPre = m_string->evaluate(t, rule);
|
||||
}
|
||||
|
||||
std::string m_variableNameExpanded;
|
||||
|
@@ -84,8 +84,6 @@ bool Severity::evaluate(Rule *rule, Transaction *transaction,
|
||||
transaction->m_highestSeverityAction = this->m_severity;
|
||||
}
|
||||
|
||||
transaction->m_variableRule.set("severity", std::to_string(m_severity), 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user