mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +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);
|
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 + 2);
|
||||||
|
}
|
||||||
if (variableValue != NULL) {
|
if (variableValue != NULL) {
|
||||||
res.insert(start, *variableValue);
|
res.insert(start, *variableValue);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user