Fix meta-actions not being applied if multiMatch is enabled in the chain starter rule

Meta-actions can only be used in non-chained rules or in the chain starter
rule of a rule chain. The m_chainedRuleParent member of the RuleWithActions
class is NULL only if the rule is not chained or if it is the chain starter
rule of a rule chain.

Fixes #2867.
This commit is contained in:
Marios Levogiannis
2023-01-20 16:05:00 +02:00
parent 5b709d9da7
commit 12add9aef0
2 changed files with 101 additions and 1 deletions

View File

@@ -219,7 +219,7 @@ void RuleWithActions::executeActionsIndependentOfChainedRuleResult(Transaction *
}
}
if (m_containsMultiMatchAction && !m_isChained) {
if (m_containsMultiMatchAction && m_chainedRuleParent == nullptr) {
if (m_severity) {
m_severity->evaluate(this, trans, ruleMessage);
}