Actions refactoring: now there is a clear definiation on the action name

This commit is contained in:
Felipe Zimmerle
2016-05-17 14:36:59 -03:00
parent 1b88947d9b
commit 8c714af8e1
62 changed files with 431 additions and 359 deletions

View File

@@ -45,16 +45,9 @@
namespace modsecurity {
namespace actions {
Msg::Msg(std::string action)
: Action(action, RunTimeOnlyIfMatchKind),
m_msg(action) {
m_msg.erase(0, 1);
m_msg.pop_back();
}
bool Msg::evaluate(Rule *rule, Transaction *transaction) {
std::string msg = MacroExpansion::expand(m_msg, transaction);
std::string msg = MacroExpansion::expand(m_parser_payload, transaction);
#ifndef NO_LOGS
transaction->debug(9, "Saving msg: " + msg);