Adds support to WEBAPPID variable

This commit is contained in:
Felipe Zimmerle
2017-11-08 10:27:44 -03:00
parent 082a3e3287
commit 23cf656f93
9 changed files with 6593 additions and 6403 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -223,6 +223,7 @@ class Driver;
#include "src/variables/server_name.h"
#include "src/variables/server_port.h"
#include "src/variables/session_id.h"
#include "src/variables/web_app_id.h"
#include "src/variables/time_day.h"
#include "src/variables/time_epoch.h"
#include "src/variables/time.h"
@@ -432,6 +433,7 @@ using modsecurity::operators::Operator;
VARIABLE_UNIQUE_ID "UNIQUE_ID"
VARIABLE_URL_ENCODED_ERROR "URLENCODED_ERROR"
VARIABLE_USER_ID "USERID"
VARIABLE_WEB_APP_ID "WEBAPPID"
VARIABLE_STATUS "VARIABLE_STATUS"
VARIABLE_IP "VARIABLE_IP"
VARIABLE_GLOBAL "VARIABLE_GLOBAL"
@@ -2138,6 +2140,10 @@ var:
{
VARIABLE_CONTAINER($$, new Variables::Status());
}
| VARIABLE_WEB_APP_ID
{
VARIABLE_CONTAINER($$, new Variables::WebAppId());
}
| RUN_TIME_VAR_DUR
{
std::string name($1);

File diff suppressed because it is too large Load Diff

View File

@@ -195,6 +195,7 @@ VARIABLE_IP (?i:(IP))
VARIABLE_USER (?i:(USER))
VARIABLE_STATUS (?i:(STATUS[^:]))
VARIABLE_TX (?i:TX)
VARIABLE_WEB_APP_ID (?i:WEBAPPID)
RUN_TIME_VAR_BLD (?i:MODSEC_BUILD)
RUN_TIME_VAR_DUR (?i:DURATION)
RUN_TIME_VAR_ENV (?i:ENV)
@@ -771,6 +772,7 @@ p::make_CONFIG_SEC_RULE_REMOVE_BY_TAG(parserSanitizer(strchr(yytext, ' ') + 1),
{VARIABLE_UNIQUE_ID} { return p::make_VARIABLE_UNIQUE_ID(*driver.loc.back()); }
{VARIABLE_URL_ENCODED_ERROR} { return p::make_VARIABLE_URL_ENCODED_ERROR(*driver.loc.back()); }
{VARIABLE_USER_ID} { return p::make_VARIABLE_USER_ID(*driver.loc.back()); }
{VARIABLE_WEB_APP_ID} { return p::make_VARIABLE_WEB_APP_ID(*driver.loc.back()); }
{VARIABLE_ARGS} { return p::make_VARIABLE_ARGS(*driver.loc.back()); }
{VARIABLE_ARGS}[:] { BEGIN(EXPECTING_VAR_PARAMETER); return p::make_VARIABLE_ARGS(*driver.loc.back()); }
{VARIABLE_ARGS_GET} { return p::make_VARIABLE_ARGS_GET(*driver.loc.back()); }