mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Fix crash in msc_rules_add_file() when using disruptive action in child rule inside of chain
This commit is contained in:
parent
466a427ab4
commit
8088d6af71
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
v3.0.3 - YYYY-MMM-DD (to be released)
|
v3.0.3 - YYYY-MMM-DD (to be released)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
- Fix crash in msc_rules_add_file() when using disruptive action in chain
|
||||||
|
[Issue #1849 - @victorhora, @zimmerle, @rperper]
|
||||||
- Fix memory leak in AuditLog::init()
|
- Fix memory leak in AuditLog::init()
|
||||||
[Issue #1897 - @weliu]
|
[Issue #1897 - @weliu]
|
||||||
- Fix RulesProperties::appendRules()
|
- Fix RulesProperties::appendRules()
|
||||||
|
@ -80,13 +80,13 @@ int Driver::addSecRule(Rule *rule) {
|
|||||||
if (lastRule && lastRule->m_chained) {
|
if (lastRule && lastRule->m_chained) {
|
||||||
if (lastRule->m_chainedRuleChild == NULL) {
|
if (lastRule->m_chainedRuleChild == NULL) {
|
||||||
rule->m_phase = lastRule->m_phase;
|
rule->m_phase = lastRule->m_phase;
|
||||||
lastRule->m_chainedRuleChild = rule;
|
|
||||||
rule->m_chainedRuleParent = lastRule;
|
|
||||||
if (rule->m_theDisruptiveAction) {
|
if (rule->m_theDisruptiveAction) {
|
||||||
m_parserError << "Disruptive actions can only be specified by";
|
m_parserError << "Disruptive actions can only be specified by";
|
||||||
m_parserError << " chain starter rules.";
|
m_parserError << " chain starter rules.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
lastRule->m_chainedRuleChild = rule;
|
||||||
|
rule->m_chainedRuleParent = lastRule;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Rule *a = lastRule->m_chainedRuleChild;
|
Rule *a = lastRule->m_chainedRuleChild;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user