mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
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.
This commit is contained in:
committed by
Felipe Zimmerle
parent
5bc75ec871
commit
ddc25dbbaa
@@ -600,7 +600,7 @@ static void write_rule_json(modsec_rec *msr, const msre_rule *rule, yajl_gen g)
|
||||
if (rule->actionset->phase != NOT_SET) {
|
||||
yajl_kv_int(g, "phase", rule->actionset->phase);
|
||||
}
|
||||
yajl_kv_bool(g, "is_chained", rule->actionset->is_chained);
|
||||
yajl_kv_bool(g, "is_chained", rule->actionset->is_chained || (rule->chain_starter != NULL));
|
||||
if (rule->actionset->is_chained && (rule->chain_starter == NULL)) {
|
||||
yajl_kv_bool(g, "chain_starter", 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user