mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
Adds reference to filename and line number to lexer errors
This commit is contained in:
@@ -68,6 +68,16 @@ Phase::Phase(std::string action)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Phase::init(std::string *error) {
|
||||
if (phase >= ModSecurity::Phases::NUMBER_OF_PHASES) {
|
||||
error->assign("Unknown phase: " + std::to_string(phase));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Phase::evaluate(Rule *rule, Assay *assay) {
|
||||
rule->phase = this->phase;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user