mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +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:
@@ -19,23 +19,22 @@
|
||||
namespace modsecurity {
|
||||
|
||||
bool RuleScript::init(std::string *err) {
|
||||
return m_lua.load(m_name, err);
|
||||
return m_lua->load(m_name, err);
|
||||
}
|
||||
|
||||
bool RuleScript::evaluate(Transaction *trans,
|
||||
std::shared_ptr<RuleMessage> ruleMessage) {
|
||||
bool RuleScript::evaluate(Transaction *trans) {
|
||||
|
||||
ms_dbg_a(trans, 4, " Executing script: " + m_name + ".");
|
||||
|
||||
bool containsDisruptive = false;
|
||||
|
||||
executeActionsIndependentOfChainedRuleResult(trans,
|
||||
&containsDisruptive, ruleMessage);
|
||||
&containsDisruptive);
|
||||
|
||||
bool ret = m_lua.run(trans);
|
||||
bool ret = m_lua->run(trans);
|
||||
|
||||
if (ret) {
|
||||
executeActionsAfterFullMatch(trans, containsDisruptive, ruleMessage);
|
||||
executeActionsAfterFullMatch(trans, containsDisruptive);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user