Adds support for RunTimeString

Using RunTimeStrings instead of runtime parser for
macro expansion.
This commit is contained in:
Felipe Zimmerle
2018-01-09 20:39:09 -03:00
parent cd30509f3a
commit 6fe8655ed9
24 changed files with 7153 additions and 6775 deletions

View File

@@ -18,6 +18,7 @@
#include "modsecurity/actions/action.h"
#include "modsecurity/rule_message.h"
#include "src/run_time_string.h"
#ifndef SRC_ACTIONS_MSG_H_
#define SRC_ACTIONS_MSG_H_
@@ -34,10 +35,15 @@ class Msg : public Action {
explicit Msg(std::string action)
: Action(action, RunTimeOnlyIfMatchKind) { }
explicit Msg(std::unique_ptr<RunTimeString> z)
: Action("msg", RunTimeOnlyIfMatchKind),
m_string(std::move(z)) { }
bool evaluate(Rule *rule, Transaction *transaction,
std::shared_ptr<RuleMessage> rm) override;
std::string data(Transaction *Transaction);
std::unique_ptr<RunTimeString> m_string;
};