mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Yet another refactoring in Rule
This commit is contained in:
@@ -93,13 +93,13 @@ class Rule_DictElement : public VariableDictElement { \
|
||||
std::vector<const VariableValue *> *l) {
|
||||
Rule *r = rule;
|
||||
|
||||
while (r && !r->m_severity) {
|
||||
while (r && !r->hasSeverity()) {
|
||||
r = r->m_chainedRuleParent;
|
||||
}
|
||||
|
||||
if (r && r->m_severity) {
|
||||
if (r && r->hasSeverity()) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
std::string *a = new std::string(std::to_string(r->m_severity->m_severity));
|
||||
std::string *a = new std::string(std::to_string(r->severity()));
|
||||
VariableValue *var = new VariableValue(&m_rule, &m_rule_severity,
|
||||
a
|
||||
);
|
||||
@@ -117,13 +117,13 @@ class Rule_DictElement : public VariableDictElement { \
|
||||
std::vector<const VariableValue *> *l) {
|
||||
Rule *r = rule;
|
||||
|
||||
while (r && !r->m_logData) {
|
||||
while (r && !r->hasLogData()) {
|
||||
r = r->m_chainedRuleParent;
|
||||
}
|
||||
|
||||
if (r && r->m_logData) {
|
||||
if (r && r->hasLogData()) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
std::string *a = new std::string(r->m_logData->data(t));
|
||||
std::string *a = new std::string(r->logData(t));
|
||||
VariableValue *var = new VariableValue(&m_rule, &m_rule_logdata,
|
||||
a
|
||||
);
|
||||
@@ -140,13 +140,13 @@ class Rule_DictElement : public VariableDictElement { \
|
||||
std::vector<const VariableValue *> *l) {
|
||||
Rule *r = rule;
|
||||
|
||||
while (r && !r->m_msg) {
|
||||
while (r && !r->hasMsg()) {
|
||||
r = r->m_chainedRuleParent;
|
||||
}
|
||||
|
||||
if (r && r->m_msg) {
|
||||
if (r && r->hasMsg()) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
std::string *a = new std::string(r->m_msg->data(t));
|
||||
std::string *a = new std::string(r->msg(t));
|
||||
VariableValue *var = new VariableValue(&m_rule, &m_rule_msg,
|
||||
a
|
||||
);
|
||||
|
Reference in New Issue
Block a user