mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Adds support to unconditional rules
This commit is contained in:
@@ -190,6 +190,7 @@ using ModSecurity::Variables::Variable;
|
||||
%token <std::string> CONFIG_DIR_DEBUG_LOG
|
||||
%token <std::string> CONFIG_DIR_DEBUG_LVL
|
||||
|
||||
%token <std::string> CONFIG_DIR_SEC_ACTION
|
||||
%token <std::string> CONFIG_DIR_SEC_DEFAULT_ACTION
|
||||
|
||||
%token <std::string> VARIABLE
|
||||
@@ -356,6 +357,24 @@ expression:
|
||||
);
|
||||
driver.addSecRule(rule);
|
||||
}
|
||||
| CONFIG_DIR_SEC_ACTION SPACE QUOTATION_MARK actions QUOTATION_MARK
|
||||
{
|
||||
Rule *rule = new Rule(
|
||||
/* op */ NULL,
|
||||
/* variables */ NULL,
|
||||
/* actions */ $4
|
||||
);
|
||||
driver.addSecAction(rule);
|
||||
}
|
||||
| CONFIG_DIR_SEC_ACTION SPACE actions
|
||||
{
|
||||
Rule *rule = new Rule(
|
||||
/* op */ NULL,
|
||||
/* variables */ NULL,
|
||||
/* actions */ $3
|
||||
);
|
||||
driver.addSecAction(rule);
|
||||
}
|
||||
| CONFIG_DIR_SEC_DEFAULT_ACTION SPACE QUOTATION_MARK actions QUOTATION_MARK
|
||||
{
|
||||
std::vector<Action *> *actions = $4;
|
||||
|
Reference in New Issue
Block a user