mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
PoC: Adds support to direct access on ARGS collection
This commit is contained in:
committed by
Felipe Zimmerle
parent
17e5a63577
commit
ca24b6bb06
@@ -144,6 +144,7 @@ class Driver;
|
||||
#include "src/utils/geo_lookup.h"
|
||||
#include "src/utils/string.h"
|
||||
#include "src/utils/system.h"
|
||||
#include "src/variables/args.h"
|
||||
#include "src/variables/args_names.h"
|
||||
#include "src/variables/xml.h"
|
||||
#include "src/variables/args_combined_size.h"
|
||||
@@ -315,6 +316,7 @@ using modsecurity::operators::Operator;
|
||||
COMMA ","
|
||||
PIPE
|
||||
NEW_LINE
|
||||
VARIABLE_ARGS
|
||||
VARIABLE_ARGS_COMBINED_SIZE
|
||||
VARIABLE_ARGS_GET_NAMES
|
||||
VARIABLE_ARGS_NAMES "Variable ARGS_NAMES"
|
||||
@@ -575,6 +577,8 @@ using modsecurity::operators::Operator;
|
||||
VARIABLE_COL "VARIABLE_COL"
|
||||
VARIABLE_STATUS "VARIABLE_STATUS"
|
||||
VARIABLE_TX "VARIABLE_TX"
|
||||
DICT_ELEMENT "Dictionary element"
|
||||
DICT_ELEMENT_REGEXP "Dictionary element, selected by regexp"
|
||||
;
|
||||
|
||||
%type <std::unique_ptr<actions::Action>> act
|
||||
@@ -1256,6 +1260,21 @@ var:
|
||||
std::unique_ptr<Variable> c(new Variables::ArgsNames());
|
||||
$$ = std::move(c);
|
||||
}
|
||||
| VARIABLE_ARGS DICT_ELEMENT
|
||||
{
|
||||
std::unique_ptr<Variable> c(new Variables::Args_DictElement($2));
|
||||
$$ = std::move(c);
|
||||
}
|
||||
| VARIABLE_ARGS DICT_ELEMENT_REGEXP
|
||||
{
|
||||
std::unique_ptr<Variable> c(new Variables::Args_DictElementRegexp($2));
|
||||
$$ = std::move(c);
|
||||
}
|
||||
| VARIABLE_ARGS
|
||||
{
|
||||
std::unique_ptr<Variable> c(new Variables::Args_NoDictElement());
|
||||
$$ = std::move(c);
|
||||
}
|
||||
| VARIABLE_ARGS_GET_NAMES
|
||||
{
|
||||
std::unique_ptr<Variable> c(new Variables::ArgsGetNames());
|
||||
|
Reference in New Issue
Block a user