mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
Refactoring on Action - having RuleWithAction and RuleWithActionsProperties
This commit is contained in:
@@ -71,7 +71,7 @@ class Rule_DictElement : public RuleVariable, public VariableDictElement {
|
||||
const RuleWithActions *rule,
|
||||
VariableValues *l) {
|
||||
|
||||
if (rule->hasRevisionAction()) {
|
||||
if (rule->hasRevision()) {
|
||||
auto var = std::make_shared<VariableValue>(&m_rule, &m_rule_rev, std::unique_ptr<std::string>(new std::string(rule->getRevision())));
|
||||
VariableOrigin origin;
|
||||
origin.m_offset = 0;
|
||||
@@ -87,7 +87,7 @@ class Rule_DictElement : public RuleVariable, public VariableDictElement {
|
||||
const RuleWithActions *rule,
|
||||
VariableValues *l) {
|
||||
|
||||
if (rule->hasSeverityAction()) {
|
||||
if (rule->hasSeverity()) {
|
||||
auto var = std::make_shared<VariableValue>(&m_rule, &m_rule_severity, std::unique_ptr<std::string>(new std::string(std::to_string(rule->getSeverity()))));
|
||||
VariableOrigin origin;
|
||||
origin.m_offset = 0;
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
#ifndef SRC_VARIABLES_RULE_VARIABLE_H_
|
||||
#define SRC_VARIABLES_RULE_VARIABLE_H_
|
||||
|
||||
#include "src/rule_with_actions.h"
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
|
||||
class RuleWithActions;
|
||||
class Transaction;
|
||||
namespace variables {
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class VariableWithRunTimeString : public Variable {
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual void populate(RuleWithActions *rule) {
|
||||
virtual void populate(const RuleWithActions *rule) {
|
||||
if (m_string) {
|
||||
m_string->populate(rule);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user