Adds support to the action `allow' in the sec parser

This commit is contained in:
Felipe Zimmerle
2016-01-12 10:42:36 -03:00
parent 7901c2c899
commit 923620fbd0
2 changed files with 23 additions and 0 deletions

View File

@@ -227,6 +227,7 @@ using modsecurity::Variables::Tx;
%token <std::string> FREE_TEXT
%token <std::string> ACTION
%token <std::string> ACTION_ACCURACY
%token <std::string> ACTION_ALLOW
%token <std::string> ACTION_REDIRECT
%token <std::string> ACTION_SKIP_AFTER
%token <std::string> ACTION_SKIP
@@ -826,6 +827,24 @@ act:
{
$$ = Action::instantiate($1);
}
| ACTION_ALLOW
{
/*
TODO: allow is not implemented yet.
std::string error;
Allow *allow = new Allow($1);
if (allow->init(&error) == false) {
driver.parserError << error;
YYERROR;
}
$$ = allow;
*/
$$ = Action::instantiate($1);
}
| ACTION_REDIRECT
{
$$ = new Redirect($1);