mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Renames defaultActions to m_defaultActions in RulesProperties
This commit is contained in:
parent
7927ddda91
commit
60402d8b80
@ -313,8 +313,8 @@ class RulesProperties {
|
||||
|
||||
for (int i = 0; i <= modsecurity::Phases::NUMBER_OF_PHASES; i++) {
|
||||
std::vector<actions::Action *> *actions_from = \
|
||||
from->defaultActions+i;
|
||||
std::vector<actions::Action *> *actions_to = to->defaultActions+i;
|
||||
from->m_defaultActions+i;
|
||||
std::vector<actions::Action *> *actions_to = to->m_defaultActions+i;
|
||||
for (int j = 0; j < actions_from->size(); j++) {
|
||||
actions::Action *action = actions_from->at(j);
|
||||
action->refCountIncrease();
|
||||
@ -419,7 +419,7 @@ class RulesProperties {
|
||||
ConfigString m_httpblKey;
|
||||
ConfigString m_uploadDirectory;
|
||||
ConfigString m_uploadTmpDirectory;
|
||||
std::vector<actions::Action *> defaultActions[8];
|
||||
std::vector<actions::Action *> m_defaultActions[8];
|
||||
std::vector<modsecurity::Rule *> m_rules[8];
|
||||
};
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace disruptive {
|
||||
bool Block::evaluate(Rule *rule, Transaction *transaction, RuleMessage *rm) {
|
||||
transaction->debug(8, "Marking request as disruptive.");
|
||||
|
||||
for (Action *a : transaction->m_rules->defaultActions[rule->phase]) {
|
||||
for (Action *a : transaction->m_rules->m_defaultActions[rule->phase]) {
|
||||
if (a->isDisruptive() == false) {
|
||||
continue;
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ expression:
|
||||
definedPhase = modsecurity::Phases::RequestHeadersPhase;
|
||||
}
|
||||
|
||||
if (!driver.defaultActions[definedPhase].empty()) {
|
||||
if (!driver.m_defaultActions[definedPhase].empty()) {
|
||||
std::stringstream ss;
|
||||
ss << "SecDefaultActions can only be placed once per phase and configuration context. Phase ";
|
||||
ss << secRuleDefinedPhase;
|
||||
@ -925,7 +925,7 @@ expression:
|
||||
}
|
||||
|
||||
for (actions::Action *a : checkedActions) {
|
||||
driver.defaultActions[definedPhase].push_back(a);
|
||||
driver.m_defaultActions[definedPhase].push_back(a);
|
||||
}
|
||||
|
||||
delete actions;
|
||||
|
@ -309,7 +309,7 @@ std::vector<std::string *> Rule::executeSecDefaultActionTransofrmations(
|
||||
// Notice that first we make sure that won't be a t:none
|
||||
// on the target rule.
|
||||
if (none == 0) {
|
||||
for (Action *a : trasn->m_rules->defaultActions[this->phase]) {
|
||||
for (Action *a : trasn->m_rules->m_defaultActions[this->phase]) {
|
||||
if (a->action_kind \
|
||||
== actions::Action::RunTimeBeforeMatchAttemptKind) {
|
||||
newValue = new std::string(a->evaluate(*value, trasn));
|
||||
@ -472,7 +472,7 @@ std::vector<const collection::Variable *> Rule::getFinalVars(
|
||||
void Rule::executeActionsAfterFullMatch(Transaction *trasn,
|
||||
bool containsDisruptive, RuleMessage *ruleMessage) {
|
||||
|
||||
for (Action *a : trasn->m_rules->defaultActions[this->phase]) {
|
||||
for (Action *a : trasn->m_rules->m_defaultActions[this->phase]) {
|
||||
if (a->action_kind != actions::Action::RunTimeOnlyIfMatchKind) {
|
||||
continue;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ Rules::~Rules() {
|
||||
}
|
||||
}
|
||||
for (i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
|
||||
std::vector<actions::Action *> *tmp = &defaultActions[i];
|
||||
std::vector<actions::Action *> *tmp = &m_defaultActions[i];
|
||||
while (tmp->empty() == false) {
|
||||
actions::Action *a = tmp->back();
|
||||
a->refCountDecreaseAndCheck();
|
||||
|
Loading…
x
Reference in New Issue
Block a user