mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Extends the direct access model to other collections
This commit is contained in:
committed by
Felipe Zimmerle
parent
ca24b6bb06
commit
f2d149fc5f
@@ -26,7 +26,7 @@ namespace actions {
|
||||
|
||||
|
||||
bool Chain::evaluate(Rule *rule, Transaction *transaction) {
|
||||
rule->chained = true;
|
||||
rule->m_chained = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -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->m_defaultActions[rule->phase]) {
|
||||
for (Action *a : transaction->m_rules->m_defaultActions[rule->m_phase]) {
|
||||
if (a->isDisruptive() == false) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ bool Deny::evaluate(Rule *rule, Transaction *transaction, RuleMessage *rm) {
|
||||
|
||||
log.append("Access denied with code %d");
|
||||
log.append(" (phase ");
|
||||
log.append(std::to_string(rm->m_rule->phase - 1) + "). ");
|
||||
log.append(std::to_string(rm->m_rule->m_phase - 1) + "). ");
|
||||
|
||||
transaction->m_it.disruptive = true;
|
||||
intervention::freeLog(&transaction->m_it);
|
||||
|
@@ -46,7 +46,7 @@ bool Redirect::evaluate(Rule *rule, Transaction *transaction,
|
||||
}
|
||||
log.append("Access denied with code %d");
|
||||
log.append(" (phase ");
|
||||
log.append(std::to_string(rm->m_rule->phase - 1) + "). ");
|
||||
log.append(std::to_string(rm->m_rule->m_phase - 1) + "). ");
|
||||
|
||||
intervention::freeUrl(&transaction->m_it);
|
||||
transaction->m_it.url = strdup(m_urlExpanded.c_str());
|
||||
|
@@ -80,7 +80,7 @@ bool Phase::init(std::string *error) {
|
||||
|
||||
|
||||
bool Phase::evaluate(Rule *rule, Transaction *transaction) {
|
||||
rule->phase = m_phase;
|
||||
rule->m_phase = m_phase;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ bool RuleId::init(std::string *error) {
|
||||
|
||||
|
||||
bool RuleId::evaluate(Rule *rule, Transaction *transaction) {
|
||||
rule->rule_id = m_ruleId;
|
||||
rule->m_ruleId = m_ruleId;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -128,7 +128,7 @@ bool SetVar::evaluate(Rule *rule, Transaction *transm_parser_payload) {
|
||||
}
|
||||
|
||||
try {
|
||||
std::string *resolvedValue =
|
||||
std::unique_ptr<std::string> resolvedValue =
|
||||
transm_parser_payload->m_collections.resolveFirst(
|
||||
m_collectionName,
|
||||
m_variableNameExpanded);
|
||||
|
Reference in New Issue
Block a user