mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-02 22:54:54 +03:00
Constify Transaction on variable resolution
This commit is contained in:
committed by
Felipe Zimmerle
parent
7afcd3046d
commit
1f80055f63
@@ -39,8 +39,8 @@ class Ip_DictElement : public Variable {
|
||||
: Variable("IP:" + dictElement),
|
||||
m_dictElement("IP:" + dictElement) { }
|
||||
|
||||
void evaluate(Transaction *t,
|
||||
VariableValues *l) override {
|
||||
void evaluate(const Transaction *t,
|
||||
VariableValues *l) const noexcept override {
|
||||
t->m_collections.m_ip_collection->resolveMultiMatches(
|
||||
*getVariableKey(), t->m_collections.m_ip_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
@@ -55,8 +55,8 @@ class Ip_NoDictElement : public Variable {
|
||||
Ip_NoDictElement()
|
||||
: Variable("IP") { }
|
||||
|
||||
void evaluate(Transaction *t,
|
||||
VariableValues *l) override {
|
||||
void evaluate(const Transaction *t,
|
||||
VariableValues *l) const noexcept override {
|
||||
t->m_collections.m_ip_collection->resolveMultiMatches("",
|
||||
t->m_collections.m_ip_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
@@ -70,8 +70,8 @@ class Ip_DictElementRegexp : public VariableRegex {
|
||||
: VariableRegex("IP", dictElement),
|
||||
m_dictElement(dictElement) { }
|
||||
|
||||
void evaluate(Transaction *t,
|
||||
VariableValues *l) override {
|
||||
void evaluate(const Transaction *t,
|
||||
VariableValues *l) const noexcept override {
|
||||
t->m_collections.m_ip_collection->resolveRegularExpression(
|
||||
m_dictElement, t->m_collections.m_ip_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
@@ -90,8 +90,8 @@ class Ip_DynamicElement : public VariableWithRunTimeString {
|
||||
)
|
||||
{ }
|
||||
|
||||
void evaluate(Transaction *t,
|
||||
VariableValues *l) override {
|
||||
void evaluate(const Transaction *t,
|
||||
VariableValues *l) const noexcept override {
|
||||
std::string string = m_string->evaluate(t);
|
||||
t->m_collections.m_ip_collection->resolveMultiMatches(
|
||||
string,
|
||||
|
||||
Reference in New Issue
Block a user