mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Refactoring: Pass all the control over the variables to the Variables class
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->resolve_variable_first(variable);
|
||||
variableValue = assay->m_variables.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->resolve_variable_first(col, var);
|
||||
variableValue = assay->m_variables.resolveFirst(col, var);
|
||||
}
|
||||
|
||||
res.erase(start, end - start + 2);
|
||||
|
Reference in New Issue
Block a user