mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +03:00
Fix the rule execution debug log, so that tests won't complain
This commit is contained in:
14
src/rule.cc
14
src/rule.cc
@@ -196,11 +196,19 @@ bool Rule::evaluate(Assay *assay) {
|
|||||||
return evaluateActions(assay);
|
return evaluateActions(assay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string eparam = MacroExpansion::expand(this->op->param, assay);
|
||||||
|
|
||||||
|
if (this->op->param != eparam) {
|
||||||
|
eparam = "\"" + eparam + "\" Was: \"" + this->op->param + "\"";
|
||||||
|
} else {
|
||||||
|
eparam = "\"" + eparam + "\"";
|
||||||
|
}
|
||||||
|
|
||||||
assay->debug(4, "(Rule: " + std::to_string(rule_id) \
|
assay->debug(4, "(Rule: " + std::to_string(rule_id) \
|
||||||
+ ") Executing operator \"" + this->op->op \
|
+ ") Executing operator \"" + this->op->op \
|
||||||
+ "\" with param: " \
|
+ "\" with param " \
|
||||||
+ MacroExpansion::expandKeepOriginal(this->op->param, assay) \
|
+ eparam \
|
||||||
+ ", against " \
|
+ " against " \
|
||||||
+ Variable::to_s(variables) + ".");
|
+ Variable::to_s(variables) + ".");
|
||||||
|
|
||||||
clock_t begin = clock();
|
clock_t begin = clock();
|
||||||
|
Reference in New Issue
Block a user