-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: escapes $$ prior to escaping \$ #1059
Conversation
closes: smallrye#1056 Signed-off-by: Steve Hawkins <[email protected]>
I think this trades one problem for another. If there's a specific parsing mode that we need for expression strings then it should be implemented directly in |
@dmlloyd it seems like there isn't a great way to do this. The comment Line 94 in 889fa9f
Are you thinking that something new like Flag.ESCAPES_COMPAT is needed to handle both \$ and not automatically treat $$ as an escaped $? Or @radcortez based upon your issue comment, are you wanting to further limit where the case and not do the $$ to $ substitution as long as Flag.MINI_EXPRS is not enabled and/or the next character is not {? |
The existing workaround is already concerning IMO. What if it hits
Exactly. But MP Config itself also does a very poor job of defining the behavior of |
Adding on to that, I think MP Config's treatment of |
I agree it's not well defined. My interest here was primarily the $$ case to resolve the downstream issue keycloak/keycloak#19831 - but obviously someone will hit the issue of additional or combined escapes eventually. Downstream I'm proposing that we simply document for now that $$ needs to be escaped as \$\$ keycloak/keycloak#25218 - seems like it should work regardless of the resolution here. If that's all that's worth doing at this time, I'm also fine just with closing this pr. |
@shawkins, thank you for the PR. We are now proposing a new alternative to fix the issue: smallrye/smallrye-common#344 |
Great, hopefully we'll be able to adopt that in Keycloak. |
This seems to be the most consistent handling for $ escaping - escape existing instances of $$ before replacing $ with $$. This is not of course completely compatible with the existing handling.
closes: #1056