File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,6 @@ std::string Rules::getParserError() {
152
152
153
153
154
154
int Rules::evaluate (int phase, Transaction *transaction) {
155
- bool remove_rule;
156
-
157
155
if (phase > modsecurity::Phases::NUMBER_OF_PHASES) {
158
156
return 0 ;
159
157
}
@@ -180,7 +178,6 @@ int Rules::evaluate(int phase, Transaction *transaction) {
180
178
}
181
179
182
180
for (int i = 0 ; i < rules.size (); i++) {
183
- remove_rule = false ;
184
181
Rule *rule = rules[i];
185
182
if (transaction->m_marker .empty () == false ) {
186
183
debug (9 , " Skipped rule id '" + std::to_string (rule->m_ruleId ) \
@@ -206,6 +203,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
206
203
debug (9 , " Skipped rule id '" + std::to_string (rule->m_ruleId ) \
207
204
+ " '. Removed by an SecRuleRemove directive." );
208
205
} else {
206
+ bool remove_rule = false ;
209
207
if (m_exceptions.m_remove_rule_by_msg .empty () == false ) {
210
208
for (auto &z : m_exceptions.m_remove_rule_by_msg ) {
211
209
if (rule->containsMsg (z, transaction) == true ) {
@@ -216,7 +214,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
216
214
break ;
217
215
}
218
216
}
219
- if (remove_rule) {
217
+ if (remove_rule) {
220
218
continue ;
221
219
}
222
220
}
@@ -231,7 +229,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
231
229
break ;
232
230
}
233
231
}
234
- if (remove_rule) {
232
+ if (remove_rule) {
235
233
continue ;
236
234
}
237
235
}
You can’t perform that action at this time.
0 commit comments