mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
Handling key exceptions on the variable itself
This is the first step towords to solve #1697
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
|
||||
#ifndef SRC_VARIABLES_TX_H_
|
||||
#define SRC_VARIABLES_TX_H_
|
||||
@@ -41,7 +42,7 @@ class Tx_DictElement : public Variable {
|
||||
Rule *rule,
|
||||
std::vector<const VariableValue *> *l) override {
|
||||
t->m_collections.m_tx_collection->resolveMultiMatches(
|
||||
m_name, l);
|
||||
m_name, l, m_keyExclusion);
|
||||
}
|
||||
|
||||
std::string m_dictElement;
|
||||
@@ -56,7 +57,8 @@ class Tx_NoDictElement : public Variable {
|
||||
void evaluate(Transaction *t,
|
||||
Rule *rule,
|
||||
std::vector<const VariableValue *> *l) override {
|
||||
t->m_collections.m_tx_collection->resolveMultiMatches("", l);
|
||||
t->m_collections.m_tx_collection->resolveMultiMatches("", l,
|
||||
m_keyExclusion);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -72,7 +74,7 @@ class Tx_DictElementRegexp : public Variable {
|
||||
Rule *rule,
|
||||
std::vector<const VariableValue *> *l) override {
|
||||
t->m_collections.m_tx_collection->resolveRegularExpression(
|
||||
m_dictElement, l);
|
||||
m_dictElement, l, m_keyExclusion);
|
||||
}
|
||||
|
||||
Utils::Regex m_r;
|
||||
@@ -90,7 +92,8 @@ class Tx_DynamicElement : public Variable {
|
||||
Rule *rule,
|
||||
std::vector<const VariableValue *> *l) override {
|
||||
std::string string = m_string->evaluate(t);
|
||||
t->m_collections.m_tx_collection->resolveMultiMatches(string, l);
|
||||
t->m_collections.m_tx_collection->resolveMultiMatches(string, l,
|
||||
m_keyExclusion);
|
||||
}
|
||||
|
||||
void del(Transaction *t, std::string k) {
|
||||
|
||||
Reference in New Issue
Block a user