mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Fix crash in msc_rules_add_file() when using disruptive action in child rule inside of chain
This commit is contained in:
committed by
Felipe Zimmerle
parent
466a427ab4
commit
8088d6af71
@@ -80,13 +80,13 @@ int Driver::addSecRule(Rule *rule) {
|
||||
if (lastRule && lastRule->m_chained) {
|
||||
if (lastRule->m_chainedRuleChild == NULL) {
|
||||
rule->m_phase = lastRule->m_phase;
|
||||
lastRule->m_chainedRuleChild = rule;
|
||||
rule->m_chainedRuleParent = lastRule;
|
||||
if (rule->m_theDisruptiveAction) {
|
||||
m_parserError << "Disruptive actions can only be specified by";
|
||||
m_parserError << " chain starter rules.";
|
||||
return false;
|
||||
}
|
||||
lastRule->m_chainedRuleChild = rule;
|
||||
rule->m_chainedRuleParent = lastRule;
|
||||
return true;
|
||||
} else {
|
||||
Rule *a = lastRule->m_chainedRuleChild;
|
||||
|
Reference in New Issue
Block a user