mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-03 13:04:37 +03:00
Accepts phases with its name instead of a number
This commit is contained in:
@@ -42,8 +42,9 @@ Driver::~Driver() {
|
||||
|
||||
int Driver::addSecRule(Rule *rule) {
|
||||
if (rule->phase >= ModSecurity::Phases::NUMBER_OF_PHASES) {
|
||||
/** TODO: return an error message */
|
||||
return -1;
|
||||
parserError << "Unknown phase: " << std::to_string(rule->phase);
|
||||
parserError << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lastRule && lastRule->chained && lastRule->chainedRule == NULL) {
|
||||
|
Reference in New Issue
Block a user