mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
#1818: Variable names must match fully, not partially; also revert to hash table lookup instead of linear search; add test case
This commit is contained in:
committed by
Felipe Zimmerle
parent
65aa7ae5e2
commit
d810de9166
@@ -105,10 +105,9 @@ void InMemoryPerProcess::resolveMultiMatches(const std::string& var,
|
||||
l->insert(l->begin(), new VariableValue(&m_name, &i.first, &i.second));
|
||||
}
|
||||
} else {
|
||||
for (auto &a : *this) {
|
||||
if (a.first.compare(0, var.size(), var) == 0) {
|
||||
l->insert(l->begin(), new VariableValue(&m_name, &var, &a.second));
|
||||
}
|
||||
auto range = this->equal_range(var);
|
||||
for (auto it = range.first; it != range.second; ++it) {
|
||||
l->insert(l->begin(), new VariableValue(&m_name, &var, &it->second));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user