mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 18:30:35 +03:00
Refactoring on variables::Variable
Using the references on key and collection as shared pointers
This commit is contained in:
@@ -42,7 +42,7 @@ class User_DictElement : public Variable {
|
||||
void evaluate(Transaction *t,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) override {
|
||||
t->m_collections.m_user_collection->resolveMultiMatches(
|
||||
m_name, t->m_collections.m_user_collection_key,
|
||||
*getVariableKey(), t->m_collections.m_user_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class User_NoDictElement : public Variable {
|
||||
|
||||
void evaluate(Transaction *t,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) override {
|
||||
t->m_collections.m_user_collection->resolveMultiMatches(m_name,
|
||||
t->m_collections.m_user_collection->resolveMultiMatches(*getVariableKey(),
|
||||
t->m_collections.m_user_collection_key,
|
||||
t->m_rules->m_secWebAppId.m_value, l, m_keyExclusion);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class User_DynamicElement : public VariableWithRunTimeString {
|
||||
public:
|
||||
explicit User_DynamicElement(std::unique_ptr<RunTimeString> dictElement)
|
||||
: VariableWithRunTimeString(
|
||||
"USER:dynamic",
|
||||
"USER",
|
||||
std::move(dictElement)
|
||||
)
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user