Skip to content

Commit ddc25db

Browse files
p0pr0ck5Felipe Zimmerle
authored andcommitted
Fix 'is_chained' value for final rule in chain
'is_chained' should be true for an actionset when the is_chained member of the struct is true, or when its rule has a valid chain_starter member.
1 parent 5bc75ec commit ddc25db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apache2/msc_logging.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ static void write_rule_json(modsec_rec *msr, const msre_rule *rule, yajl_gen g)
600600
if (rule->actionset->phase != NOT_SET) {
601601
yajl_kv_int(g, "phase", rule->actionset->phase);
602602
}
603-
yajl_kv_bool(g, "is_chained", rule->actionset->is_chained);
603+
yajl_kv_bool(g, "is_chained", rule->actionset->is_chained || (rule->chain_starter != NULL));
604604
if (rule->actionset->is_chained && (rule->chain_starter == NULL)) {
605605
yajl_kv_bool(g, "chain_starter", 1);
606606
}

0 commit comments

Comments
 (0)