mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-02 04:27:47 +03:00
Adds references to the collection variables
This commit is contained in:
committed by
Felipe Zimmerle
parent
e95efa05cc
commit
d851699529
@@ -51,12 +51,17 @@ void AnchoredSetVariable::unset() {
|
||||
|
||||
void AnchoredSetVariable::set(const std::string &key,
|
||||
const std::string &value, size_t offset) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
std::string *v = new std::string(value);
|
||||
std::string *k = new std::string(m_name + ":" + key);
|
||||
|
||||
collection::Variable *var = new collection::Variable(k, v);
|
||||
|
||||
origin->m_offset = offset;
|
||||
origin->m_length = value.size();
|
||||
|
||||
var->m_dynamic_value = true;
|
||||
var->m_dynamic = false;
|
||||
var->m_orign.push_back(std::move(origin));
|
||||
emplace(key, var);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user