From 946a35004384e036d89877003f9b49a97c7f9c02 Mon Sep 17 00:00:00 2001 From: brectanus Date: Thu, 24 Jan 2008 22:39:13 +0000 Subject: [PATCH] Fixed removing cained rules with ctl action. --- CHANGES | 2 ++ apache2/re.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b71e3c92..201288ce 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ 24 Jan 2008 - 2.5.0-rc2 ----------------------- + * Fixed removal of chained rules via ctl:ruleRemoveById. + * Implemented SecUploadFileMode to allow setting the mode for uploaded files. * Implemented "block" action. diff --git a/apache2/re.c b/apache2/re.c index ad5c6000..7c54b490 100644 --- a/apache2/re.c +++ b/apache2/re.c @@ -932,8 +932,17 @@ apr_status_t msre_ruleset_process_phase(msre_ruleset *ruleset, modsec_rec *msr) /* Go to the next rule if this one has been removed. */ if (do_process == 0) { if (msr->txcfg->debuglog_level >= 5) { - msr_log(msr, 5, "Not processing rule id=\"%s\": removed by ctl action", rule->actionset->id); + msr_log(msr, 5, "Not processing %srule id=\"%s\": " + "removed by ctl action", + rule->actionset->is_chained ? "chained " : "", + rule->actionset->id); } + + /* Skip the whole chain, if this is a chained rule */ + if (rule->actionset->is_chained) { + mode = NEXT_CHAIN; + } + continue; } }