ramanathan1504 commented on code in PR #4393:
URL: https://github.com/apache/logging-log4j2/pull/4393#discussion_r4329442881
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java:
##########
@@ -1123,6 +1151,10 @@ private int substitute(
}
}
}
+ varName = unescape(varName, escape);
Review Comment:
`unescape` runs after the nested lookups in `varNameExpr` have resolved, so
it also changes their values. `${undefined:-${p}}` with `p=a$$b` gives `a$b`,
and `p=a$}b` gives `a}b`. On `2.x` both come back unchanged. Can the `$` be
removed from the literal text only, before the nested lookups resolve?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]