mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Uses shared_ptr on variable names
This commit is contained in:
@@ -64,7 +64,7 @@ void RemoteUser::evaluate(Transaction *transaction,
|
||||
transaction->m_variableRemoteUser.assign(std::string(base64, 0, pos));
|
||||
|
||||
var = new collection::Variable(l->at(0)->m_key,
|
||||
&transaction->m_variableRemoteUser);
|
||||
std::make_shared<std::string>(transaction->m_variableRemoteUser));
|
||||
|
||||
for (auto &i : l->at(0)->m_orign) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
|
@@ -143,7 +143,6 @@ class VariableModificatorCount : public Variable {
|
||||
res = new std::string(std::to_string(count));
|
||||
|
||||
val = new collection::Variable(&m_name, res);
|
||||
val->m_dynamic_value = true;
|
||||
val->m_dynamic = true;
|
||||
|
||||
l->push_back(val);
|
||||
|
@@ -127,7 +127,6 @@ void XML::evaluate(Transaction *t,
|
||||
if (content != NULL) {
|
||||
collection::Variable *var = new collection::Variable(&m_name,
|
||||
new std::string(content));
|
||||
var->m_dynamic_value = true;
|
||||
l->push_back(var);
|
||||
xmlFree(content);
|
||||
}
|
||||
|
@@ -41,7 +41,6 @@ class XML_NoDictElement : public Variable {
|
||||
m_plain("[XML document tree]"),
|
||||
m_var(&m_name, &m_plain) {
|
||||
m_var.m_dynamic = false;
|
||||
m_var.m_dynamic_value = false;
|
||||
}
|
||||
|
||||
void evaluate(Transaction *transaction,
|
||||
|
Reference in New Issue
Block a user