mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Checkin fix to rule removal code to avoid placeholders.
This commit is contained in:
parent
9e9bb318b3
commit
2bf4556cd0
@ -1028,6 +1028,8 @@ static int msre_ruleset_phase_rule_remove_with_exception(msre_ruleset *ruleset,
|
|||||||
if (mode == 0) { /* Looking for next rule. */
|
if (mode == 0) { /* Looking for next rule. */
|
||||||
int remove_rule = 0;
|
int remove_rule = 0;
|
||||||
|
|
||||||
|
/* Only remove non-placeholder rules */
|
||||||
|
if (rule->placeholder == RULE_PH_NONE) {
|
||||||
switch(re->type) {
|
switch(re->type) {
|
||||||
case RULE_EXCEPTION_REMOVE_ID :
|
case RULE_EXCEPTION_REMOVE_ID :
|
||||||
if ((rule->actionset != NULL)&&(rule->actionset->id != NULL)) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (remove_rule) {
|
if (remove_rule) {
|
||||||
/* Do not increment j. */
|
/* Do not increment j. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user