mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Fix macro expansion: no more % abandoned by the end of variable
This commit is contained in:
parent
5728110272
commit
33a704e918
@ -62,11 +62,11 @@ std::string MacroExpansion::expand(const std::string& input,
|
||||
variableValue = transaction->m_collections.resolveFirst(col, var);
|
||||
}
|
||||
|
||||
if (res[end - start + 2] == '%') {
|
||||
res.erase(start, end - start + 1);
|
||||
} else {
|
||||
res.erase(start, end - start + 2);
|
||||
res.erase(start, end - start + 1);
|
||||
if (res[start] == '%') {
|
||||
res.erase(start, 1);
|
||||
}
|
||||
|
||||
if (variableValue != NULL) {
|
||||
res.insert(start, *variableValue);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user