mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds operation unset to setVar action
This commit is contained in:
committed by
Felipe Zimmerle
parent
e95555132e
commit
b516cc6de1
@@ -374,6 +374,7 @@ using modsecurity::operators::Operator;
|
||||
SETVAR_OPERATION_EQUALS
|
||||
SETVAR_OPERATION_EQUALS_PLUS
|
||||
SETVAR_OPERATION_EQUALS_MINUS
|
||||
NOT "NOT"
|
||||
;
|
||||
|
||||
%token <std::string>
|
||||
@@ -515,7 +516,6 @@ using modsecurity::operators::Operator;
|
||||
DIRECTIVE "DIRECTIVE"
|
||||
DIRECTIVE_SECRULESCRIPT "DIRECTIVE_SECRULESCRIPT"
|
||||
FREE_TEXT "FREE_TEXT"
|
||||
NOT "NOT"
|
||||
OPERATOR "OPERATOR"
|
||||
OPERATOR_BEGINS_WITH "OPERATOR_BEGINS_WITH"
|
||||
OPERATOR_CONTAINS "OPERATOR_CONTAINS"
|
||||
@@ -2063,9 +2063,13 @@ act:
|
||||
{
|
||||
ACTION_CONTAINER($$, new actions::SetUID($1));
|
||||
}
|
||||
| ACTION_SETVAR NOT VARIABLE
|
||||
{
|
||||
ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::unsetOperation, $3));
|
||||
}
|
||||
| ACTION_SETVAR VARIABLE
|
||||
{
|
||||
ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::setToOne, $2));
|
||||
ACTION_CONTAINER($$, new actions::SetVar(actions::SetVarOperation::setToOneOperation, $2));
|
||||
}
|
||||
| ACTION_SETVAR VARIABLE SETVAR_OPERATION_EQUALS FREE_TEXT
|
||||
{
|
||||
|
Reference in New Issue
Block a user