-
Notifications
You must be signed in to change notification settings - Fork 182
CONNECT username and password need json encoding #1168
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
Conversation
| } | ||
|
|
||
| @Test | ||
| @EnabledOnOs({ WINDOWS }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not get this run on GH Actions. I'm assuming that it has something to do with how the command line handles control characters on unix systems.
| } | ||
| break; | ||
| } | ||
| appendChar(sb, s.charAt(x)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored for reuse when the entry is string or char array
| private static void appendOption(CharBuffer builder, String key, char[] value, boolean quotes, boolean comma) { | ||
| _appendStart(builder, key, quotes, comma); | ||
| @SuppressWarnings("SameParameterValue") | ||
| private static void appendOption(CharBuffer builder, String key, char[] value, boolean comma) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When used for a char array, it always represents a string value, so must be in quotes
|
|
||
| if (uriUser != null) { | ||
| appendOption(connectString, Options.OPTION_USER, uriUser, true, true); | ||
| appendOption(connectString, Options.OPTION_USER, jsonEncode(uriUser), true, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json encode since this is json, and it's a string that is provided by the user. I said this to say that I didn't encode some strings in this function since I know that they are already json safe, like the jwt which is base64 encoded.
MauriceVanVeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.