Fix the parse to distinguish between @pm content and a variable

Before this patch the parser was not understanding @pm content that
contains a variable.
This commit is contained in:
Felipe Zimmerle
2016-01-12 13:59:27 -03:00
parent 702551ed42
commit d780fd6290
2 changed files with 25 additions and 14 deletions

View File

@@ -150,6 +150,7 @@ using modsecurity::Variables::Tx;
%token <std::string> QUOTATION_MARK
%token <std::string> DIRECTIVE
%token <std::string> DIRECTIVE_SECRULESCRIPT
%token <std::string> CONFIG_DIR_REQ_BODY_LIMIT
%token <std::string> CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT
%token <std::string> CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT
@@ -440,6 +441,14 @@ expression:
);
driver.addSecAction(rule);
}
| DIRECTIVE_SECRULESCRIPT actings
{
/*
TODO: implement the SecRuleScript directive
*/
}
| CONFIG_DIR_SEC_DEFAULT_ACTION actings
{
std::vector<Action *> *actions = $2;