mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Checkin fix to rule removal code to avoid placeholders.
This commit is contained in:
@@ -1028,6 +1028,8 @@ static int msre_ruleset_phase_rule_remove_with_exception(msre_ruleset *ruleset,
|
||||
if (mode == 0) { /* Looking for next rule. */
|
||||
int remove_rule = 0;
|
||||
|
||||
/* Only remove non-placeholder rules */
|
||||
if (rule->placeholder == RULE_PH_NONE) {
|
||||
switch(re->type) {
|
||||
case RULE_EXCEPTION_REMOVE_ID :
|
||||
if ((rule->actionset != NULL)&&(rule->actionset->id != NULL)) {
|
||||
@@ -1054,6 +1056,7 @@ static int msre_ruleset_phase_rule_remove_with_exception(msre_ruleset *ruleset,
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (remove_rule) {
|
||||
/* Do not increment j. */
|
||||
|
Reference in New Issue
Block a user