mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 19:47:47 +03:00
Refactoring: Place m_variables inside Collections
This commit is contained in:
@@ -53,12 +53,12 @@ std::string MacroExpansion::expand(const std::string& input, Assay *assay) {
|
||||
std::string *variableValue;
|
||||
size_t collection = variable.find(".");
|
||||
if (collection == std::string::npos) {
|
||||
variableValue = assay->m_variables.resolveFirst(variable);
|
||||
variableValue = assay->m_collections.resolveFirst(variable);
|
||||
} else {
|
||||
std::string col = std::string(variable, 0, collection);
|
||||
std::string var = std::string(variable, collection + 1,
|
||||
variable.length() - (collection + 1));
|
||||
variableValue = assay->m_variables.resolveFirst(col, var);
|
||||
variableValue = assay->m_collections.resolveFirst(col, var);
|
||||
}
|
||||
|
||||
res.erase(start, end - start + 2);
|
||||
|
Reference in New Issue
Block a user