From ddc25dbbaa7183c431059784c55b887da54f3785 Mon Sep 17 00:00:00 2001 From: Robert Paprocki Date: Tue, 10 Nov 2015 15:54:42 -0800 Subject: [PATCH] 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. --- apache2/msc_logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache2/msc_logging.c b/apache2/msc_logging.c index 6a03d818..ee7415da 100644 --- a/apache2/msc_logging.c +++ b/apache2/msc_logging.c @@ -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); }