mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
dds support to CtlRequestBodyAccess
This commit is contained in:
@@ -29,6 +29,7 @@ class Driver;
|
||||
#include "actions/ctl_rule_remove_target_by_tag.h"
|
||||
#include "actions/ctl_rule_remove_target_by_id.h"
|
||||
#include "actions/ctl_rule_remove_by_id.h"
|
||||
#include "actions/ctl_request_body_access.h"
|
||||
#include "actions/init_col.h"
|
||||
#include "actions/set_sid.h"
|
||||
#include "actions/set_uid.h"
|
||||
@@ -304,6 +305,7 @@ using modsecurity::Variables::XML;
|
||||
%token <std::string> ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG
|
||||
%token <std::string> ACTION_CTL_RULE_REMOVE_TARGET_BY_ID
|
||||
%token <std::string> ACTION_CTL_RULE_REMOVE_BY_ID
|
||||
%token <std::string> ACTION_CTL_REQUEST_BODY_ACCESS
|
||||
|
||||
%type <std::vector<Action *> *> actions
|
||||
%type <std::vector<Variable *> *> variables
|
||||
@@ -1252,6 +1254,24 @@ act:
|
||||
YYERROR;
|
||||
}
|
||||
}
|
||||
| ACTION_CTL_REQUEST_BODY_ACCESS CONFIG_VALUE_ON
|
||||
{
|
||||
std::string error;
|
||||
$$ = new modsecurity::actions::CtlRequestBodyAccess($1 + "true");
|
||||
if ($$->init(&error) == false) {
|
||||
driver.error(@0, error);
|
||||
YYERROR;
|
||||
}
|
||||
}
|
||||
| ACTION_CTL_REQUEST_BODY_ACCESS CONFIG_VALUE_OFF
|
||||
{
|
||||
std::string error;
|
||||
$$ = new modsecurity::actions::CtlRequestBodyAccess($1 + "false");
|
||||
if ($$->init(&error) == false) {
|
||||
driver.error(@0, error);
|
||||
YYERROR;
|
||||
}
|
||||
}
|
||||
| ACTION_CTL_FORCE_REQ_BODY_VAR CONFIG_VALUE_ON
|
||||
{
|
||||
$$ = Action::instantiate($1);
|
||||
|
@@ -80,6 +80,7 @@ CONFIG_DIR_RES_BODY_LIMIT_ACTION (?i:SecResponseBodyLimitAction)
|
||||
ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG (?i:ctl:ruleRemoveTargetByTag)
|
||||
ACTION_CTL_RULE_REMOVE_TARGET_BY_ID (?i:ctl:ruleRemoveTargetById)
|
||||
ACTION_CTL_RULE_REMOVE_BY_ID (?i:ctl:ruleRemoveById)
|
||||
ACTION_CTL_REQUEST_BODY_ACCESS (?i:ctl:requestBodyAccess)
|
||||
|
||||
CONFIG_DIR_GEO_DB (?i:SecGeoLookupDb)
|
||||
|
||||
@@ -235,6 +236,7 @@ CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile)
|
||||
{ACTION_CTL_RULE_ENGINE}= { return yy::seclang_parser::make_ACTION_CTL_RULE_ENGINE(yytext, *driver.loc.back()); }
|
||||
{ACTION_CTL_AUDIT_ENGINE}= { return yy::seclang_parser::make_ACTION_CTL_AUDIT_ENGINE(yytext, *driver.loc.back()); }
|
||||
{ACTION_CTL_FORCE_REQ_BODY_VAR}= { return yy::seclang_parser::make_ACTION_CTL_FORCE_REQ_BODY_VAR(yytext, *driver.loc.back()); }
|
||||
{ACTION_CTL_REQUEST_BODY_ACCESS}= { return yy::seclang_parser::make_ACTION_CTL_REQUEST_BODY_ACCESS(yytext, *driver.loc.back()); }
|
||||
|
||||
|
||||
%{ /* Remove Rules */ %}
|
||||
|
Reference in New Issue
Block a user