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
TOMEE-2968: Postgres connection error when a password contains "}" #763
Conversation
Hi @rzo1 , why not just escaping the character (think it is with '$' IIRC)? |
Thought about it - current code will simply replace the closing bracket (even if we escape it). Escaping with $ is only done for the opening version, so atm it boils down to PREFIX="${" and SUFFIX="}" to support property substitutions like "${foo}---${bar}". The question is, if we should replace closing / opening brackets by empty string in the first place, if the suffix/prefix environment is not complete / closed. |
if incomplete noop should be done |
Agreed. This "noop" behaviour is implemented in this PR. Before: } was replaced regardless of complete or not. |
@rzo1 so maybe add a test mixing both with |
Thanks - I added some more tests mixing different cases / types of placeholders including the escape mechanism such as |
@rzo1 👍 , if you fix the regression of the default interpolation (noValueFound test and nested cases) it is good for me. |
To see, if I get you right: In case, no key is defined, we should resolve to the name of the key rather than doing a noop, ie |
@rzo1 yes, this enables for simple configuration to use some default as override key (quite useful for hosts for example) but also to nested keys more readably than with defaults - and was from the time defaults were not supported) so |
Regression should be fixed now - at least, if I understood it correctly.
|
@rzo1 doesnt |
Hmm yes - you are right. Will fix it soon. |
I think, we need to discuss, which one is the expected behaviour for
I guess, it is probably 2. or 3. - WDYT? |
I think it will be 2. $${foo} ->${foo} As a side note, Jenkins Job was green, then a new build hanged the job so I cancel and after your upcoming push, I hope the status on the PR gets in sync. |
I think, that I have fixed the regression introduced while working on the escaped sequences. The code should now reduce escaped placeholders according to 2. Let's see, what the Jenkins Job will produce :) |
@cesarhernandezgt Can we manually re-trigger the Jenkins build or does it a scheduled build. I think the failing tests are unrelated. |
@rzo1 I retrigger the build here: https://ci-builds.apache.org/job/Tomee/job/pull-request/81/ |
@cesarhernandezgt Thanks - the build looks good now 🙃 edit: let's wait a few more days to see if we get additional feedback otherwise I will integrate it as is. |
What does this PR do?
References