mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 17:41:52 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user