Adds new method for rule merge

IMPORTANT: SecDefaultAction specified on a child configuration will
overwrite the ones specified on the parent; Previously it was
concatenating.
This commit is contained in:
Felipe Zimmerle
2020-04-14 11:33:17 -03:00
parent 73c3731c9d
commit 1518015687
114 changed files with 2130 additions and 1511 deletions

View File

@@ -50,15 +50,20 @@ class RuleScript : public RuleWithActions {
std::unique_ptr<std::string> fileName,
int lineNumber)
: RuleWithActions(actions, t, std::move(fileName), lineNumber),
m_name(name) { }
m_name(name),
m_lua(std::unique_ptr<engine::Lua>(new engine::Lua())) { }
RuleScript(const RuleScript &rs)
: RuleWithActions(rs),
m_name(rs.m_name),
m_lua(rs.m_lua) { }
bool init(std::string *err);
bool evaluate(Transaction *trans,
std::shared_ptr<RuleMessage> ruleMessage) override;
bool evaluate(Transaction *trans) override;
std::string m_name;
engine::Lua m_lua;
std::shared_ptr<engine::Lua> m_lua;
};
} // namespace modsecurity