You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A $ that does not start a placeholder is corrupted by StringPropertyReplacer #55326
I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
core
Bug Description
StringPropertyReplacer.replaceProperties mishandles a $ that is not followed by {. After reading the $ it reads one more character and, if that is not {, pushes both back as raw bytes. That breaks three cases:
$ at the end of the input: the look-ahead is -1, which is pushed back as the byte 0xFF, so a stray U+FFFD is appended.
$ right before a placeholder ($${b}): the second $ is replayed raw, so the placeholder after it is not replaced.
$ right before the closing brace of a placeholder (${x:5$}): the replayed } bypasses the brace tracking, so the placeholder is never closed.
The replacer is used for workflow notify-user subjects and messages (NotifyUserStepProvider), theme properties (DefaultThemeManager), SAML config parsing (StaxParserUtil), the authz client config and realm import placeholders, so e.g. a notification message ending in "25 $" is sent as "25 $�".
Version
main (nightly)
Regression
The issue is a regression
Expected behavior
A $ that does not start a placeholder is kept as-is and does not affect what follows (with a=A, b=B, x unset):
I have a fix with tests and can open a PR: keep the look-ahead character and run it through the normal processing on the next read instead of replaying it raw.
How to escape a $ sign in plain text has never been defined, which is unfortunate. I agree that the examples 1 and 3 are definitely wrong. But the second case woud need more discussion on how to escape a $ sign: not at all, with a backslash, or double dollar.
I'll be pushing a change to the PR fixing only 1 and 3. Let's discuss over there in the pull request.
Escaping would be a breaking change, so the follow-up issue would be 27.0 only. This the other changes in the linked PR are obvious bug and can be fixed and backported to previous releases.
Activity
ahus1 commentedon Nov 19, 2026
Sorry for this bug, and thanks for reporting it.
How to escape a
$sign in plain text has never been defined, which is unfortunate. I agree that the examples 1 and 3 are definitely wrong. But the second case woud need more discussion on how to escape a$sign: not at all, with a backslash, or double dollar.I'll be pushing a change to the PR fixing only 1 and 3. Let's discuss over there in the pull request.
ahus1 commentedon Nov 19, 2026
Follow-up issue #55355
Escaping would be a breaking change, so the follow-up issue would be 27.0 only. This the other changes in the linked PR are obvious bug and can be fixed and backported to previous releases.
Minimal changes to template parsing
Minimal changes to template parsing
Keep a '$' that does not start a placeholder intact in StringProperty…
Minimal changes to template parsing
Keep a trailing '$' and a '$' before '}' intact in StringPropertyRepl…