mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Refactoring: Renames RulesProperties to RulesSetProperties
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/rules_properties.h"
|
||||
#include "modsecurity/rules_set_properties.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
|
||||
namespace modsecurity {
|
||||
@@ -44,9 +44,9 @@ bool RequestBodyAccess::init(std::string *error) {
|
||||
|
||||
bool RequestBodyAccess::evaluate(Rule *rule, Transaction *transaction) {
|
||||
if (m_request_body_access) {
|
||||
transaction->m_requestBodyAccess = RulesProperties::TrueConfigBoolean;
|
||||
transaction->m_requestBodyAccess = RulesSetProperties::TrueConfigBoolean;
|
||||
} else {
|
||||
transaction->m_requestBodyAccess = RulesProperties::FalseConfigBoolean;
|
||||
transaction->m_requestBodyAccess = RulesSetProperties::FalseConfigBoolean;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -18,8 +18,8 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/rules_set_properties.h"
|
||||
#include "modsecurity/rules_set.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
|
||||
namespace modsecurity {
|
||||
@@ -31,11 +31,11 @@ bool RuleEngine::init(std::string *error) {
|
||||
std::string what(m_parser_payload, 11, m_parser_payload.size() - 11);
|
||||
|
||||
if (what == "on") {
|
||||
m_ruleEngine = RulesProperties::EnabledRuleEngine;
|
||||
m_ruleEngine = RulesSetProperties::EnabledRuleEngine;
|
||||
} else if (what == "off") {
|
||||
m_ruleEngine = RulesProperties::DisabledRuleEngine;
|
||||
m_ruleEngine = RulesSetProperties::DisabledRuleEngine;
|
||||
} else if (what == "detectiononly") {
|
||||
m_ruleEngine = RulesProperties::DetectionOnlyRuleEngine;
|
||||
m_ruleEngine = RulesSetProperties::DetectionOnlyRuleEngine;
|
||||
} else {
|
||||
error->assign("Internal error. Expected: On, Off or DetectionOnly; " \
|
||||
"got: " + m_parser_payload);
|
||||
@@ -48,7 +48,7 @@ bool RuleEngine::init(std::string *error) {
|
||||
bool RuleEngine::evaluate(Rule *rule, Transaction *transaction) {
|
||||
std::stringstream a;
|
||||
a << "Setting SecRuleEngine to ";
|
||||
a << modsecurity::RulesProperties::ruleEngineStateString(m_ruleEngine);
|
||||
a << modsecurity::RulesSetProperties::ruleEngineStateString(m_ruleEngine);
|
||||
a << " as requested by a ctl:ruleEngine action";
|
||||
|
||||
ms_dbg_a(transaction, 8, a.str());
|
||||
|
@@ -15,9 +15,9 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/rules_set_properties.h"
|
||||
#include "modsecurity/actions/action.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
|
||||
|
||||
#ifndef SRC_ACTIONS_CTL_RULE_ENGINE_H_
|
||||
@@ -32,12 +32,12 @@ class RuleEngine : public Action {
|
||||
public:
|
||||
explicit RuleEngine(const std::string &action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind),
|
||||
m_ruleEngine(RulesProperties::PropertyNotSetRuleEngine) { }
|
||||
m_ruleEngine(RulesSetProperties::PropertyNotSetRuleEngine) { }
|
||||
|
||||
bool init(std::string *error) override;
|
||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||
|
||||
RulesProperties::RuleEngine m_ruleEngine;
|
||||
RulesSetProperties::RuleEngine m_ruleEngine;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -25,12 +25,12 @@
|
||||
#include <locale>
|
||||
#include <cstring>
|
||||
|
||||
#include "modsecurity/rules_set_properties.h"
|
||||
#include "modsecurity/rules_set.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "src/actions/transformations/transformation.h"
|
||||
#include "src/utils/string.h"
|
||||
#include "src/utils/system.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
|
@@ -15,8 +15,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/rules_set_properties.h"
|
||||
#include "modsecurity/actions/action.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
#include "src/actions/transformations/transformation.h"
|
||||
|
||||
#ifndef SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_UNI_H_
|
||||
|
Reference in New Issue
Block a user