mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +03:00
actions: Removes Rule parameter from runtime execute
Generals organization on the Action class
This commit is contained in:
committed by
Felipe Zimmerle
parent
eb3e05646d
commit
bf3a1d84ff
@@ -15,25 +15,22 @@
|
||||
|
||||
#include "src/actions/phase.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rule.h"
|
||||
#include "modsecurity/modsecurity.h"
|
||||
|
||||
#include "src/utils/string.h"
|
||||
#include "src/rule_with_actions.h"
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace actions {
|
||||
|
||||
bool Phase::init(std::string *error) {
|
||||
std::string a = utils::string::tolower(m_parser_payload);
|
||||
std::string a = utils::string::tolower(m_parserPayload);
|
||||
m_phase = -1;
|
||||
|
||||
try {
|
||||
m_phase = std::stoi(m_parser_payload);
|
||||
m_phase = std::stoi(m_parserPayload);
|
||||
if (m_phase == 0) {
|
||||
m_phase = modsecurity::Phases::ConnectionPhase;
|
||||
m_secRulesPhase = 0;
|
||||
@@ -53,7 +50,7 @@ bool Phase::init(std::string *error) {
|
||||
m_phase = modsecurity::Phases::LoggingPhase;
|
||||
m_secRulesPhase = 5;
|
||||
} else {
|
||||
error->assign("Unknown phase: " + m_parser_payload);
|
||||
error->assign("Unknown phase: " + m_parserPayload);
|
||||
return false;
|
||||
}
|
||||
} catch (...) {
|
||||
@@ -73,10 +70,5 @@ bool Phase::init(std::string *error) {
|
||||
}
|
||||
|
||||
|
||||
bool Phase::execute(RuleWithActions *rule, Transaction *transaction) {
|
||||
rule->setPhase(m_phase);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace actions
|
||||
} // namespace modsecurity
|
||||
|
||||
Reference in New Issue
Block a user