mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Uses an enumeration to determine the state of the SecRuleEngine
This commit is contained in:
@@ -81,7 +81,7 @@ class Driver {
|
||||
|
||||
std::vector<Rule *> rules[7]; // Number of Phases.
|
||||
|
||||
int sec_rule_engine;
|
||||
ModSecurity::Rules::RuleEngine secRuleEngine;
|
||||
int sec_audit_type;
|
||||
bool sec_audit_engine;
|
||||
bool sec_request_body_access;
|
||||
|
@@ -186,15 +186,15 @@ expression:
|
||||
}
|
||||
| CONFIG_DIR_RULE_ENG SPACE CONFIG_VALUE_OFF
|
||||
{
|
||||
driver.sec_rule_engine = 0;
|
||||
driver.secRuleEngine = ModSecurity::Rules::DisabledRuleEngine;
|
||||
}
|
||||
| CONFIG_DIR_RULE_ENG SPACE CONFIG_VALUE_ON
|
||||
{
|
||||
driver.sec_rule_engine = 1;
|
||||
driver.secRuleEngine = ModSecurity::Rules::EnabledRuleEngine;
|
||||
}
|
||||
| CONFIG_DIR_RULE_ENG SPACE CONFIG_VALUE_DETC
|
||||
{
|
||||
driver.sec_rule_engine = 2;
|
||||
driver.secRuleEngine = ModSecurity::Rules::DetectionOnlyRuleEngine;
|
||||
}
|
||||
| CONFIG_DIR_REQ_BODY SPACE CONFIG_VALUE_ON
|
||||
{
|
||||
|
@@ -154,7 +154,7 @@ int Rules::merge(Driver *from) {
|
||||
}
|
||||
}
|
||||
|
||||
this->sec_rule_engine = from->sec_rule_engine;
|
||||
this->secRuleEngine = from->secRuleEngine;
|
||||
this->sec_audit_type = from->sec_audit_type;
|
||||
this->sec_audit_engine = from->sec_audit_engine;
|
||||
this->sec_request_body_access = from->sec_request_body_access;
|
||||
@@ -189,7 +189,7 @@ int Rules::merge(Rules *from) {
|
||||
}
|
||||
}
|
||||
|
||||
this->sec_rule_engine = from->sec_rule_engine;
|
||||
this->secRuleEngine = from->secRuleEngine;
|
||||
this->sec_audit_type = from->sec_audit_type;
|
||||
this->sec_audit_engine = from->sec_audit_engine;
|
||||
this->sec_request_body_access = from->sec_request_body_access;
|
||||
|
Reference in New Issue
Block a user