mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix macro expansion: Now support } and/or }% to close a variable
This commit is contained in:
parent
f44143436b
commit
30d9ade192
@ -62,7 +62,11 @@ std::string MacroExpansion::expand(const std::string& input,
|
||||
variableValue = transaction->m_collections.resolveFirst(col, var);
|
||||
}
|
||||
|
||||
res.erase(start, end - start + 2);
|
||||
if (res[end - start + 2] == '%') {
|
||||
res.erase(start, end - start + 1);
|
||||
} else {
|
||||
res.erase(start, end - start + 2);
|
||||
}
|
||||
if (variableValue != NULL) {
|
||||
res.insert(start, *variableValue);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user