Change ctl parameters to be case insensitive.

Initial implementation of ctl:removeRuleById.  See #259.
This commit is contained in:
brectanus
2007-10-16 00:14:42 +00:00
parent f66e8c5b38
commit 9efa02f423
4 changed files with 51 additions and 18 deletions

View File

@@ -1384,6 +1384,25 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) {
int invocations = 0;
int multi_match = 0;
/* Check if this rule was excluded at runtime */
if ((rule->actionset->id !=NULL) && (! apr_is_empty_array(msr->removed_rules))) {
const char *range;
for(i = 0; i < msr->removed_rules->nelts; i++) {
range = ((const char**)msr->removed_rules->elts)[i];
if (msr->txcfg->debuglog_level >= 9) {
msr_log(msr, 9, "Checking rule id=\"%s\" against exclusion: %s", rule->actionset->id, range);
}
if (rule_id_in_range(atoi(rule->actionset->id), range)) {
msr_log(msr, 5, "Rule id=\"%s\" excluded.", rule->actionset->id);
return RULE_NO_MATCH;
}
}
}
/* Choose the correct metadata/disruptive action actionset. */
acting_actionset = rule->actionset;
if (rule->chain_starter != NULL) {