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() {
152152
153153
154154int Rules::evaluate (int phase, Transaction *transaction) {
155- bool remove_rule;
156-
157155 if (phase > modsecurity::Phases::NUMBER_OF_PHASES) {
158156 return 0 ;
159157 }
@@ -180,7 +178,6 @@ int Rules::evaluate(int phase, Transaction *transaction) {
180178 }
181179
182180 for (int i = 0 ; i < rules.size (); i++) {
183- remove_rule = false ;
184181 Rule *rule = rules[i];
185182 if (transaction->m_marker .empty () == false ) {
186183 debug (9 , " Skipped rule id '" + std::to_string (rule->m_ruleId ) \
@@ -206,6 +203,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
206203 debug (9 , " Skipped rule id '" + std::to_string (rule->m_ruleId ) \
207204 + " '. Removed by an SecRuleRemove directive." );
208205 } else {
206+ bool remove_rule = false ;
209207 if (m_exceptions.m_remove_rule_by_msg .empty () == false ) {
210208 for (auto &z : m_exceptions.m_remove_rule_by_msg ) {
211209 if (rule->containsMsg (z, transaction) == true ) {
@@ -216,7 +214,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
216214 break ;
217215 }
218216 }
219- if (remove_rule) {
217+ if (remove_rule) {
220218 continue ;
221219 }
222220 }
@@ -231,7 +229,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
231229 break ;
232230 }
233231 }
234- if (remove_rule) {
232+ if (remove_rule) {
235233 continue ;
236234 }
237235 }
You can’t perform that action at this time.
0 commit comments