-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 NuageVsp errors for build-master-slowbuild #1092
Conversation
@DaanHoogland, this PR contains the fixes for the build-master-slowbuild |
thanks @nlivens lgtm but will run regression tests. |
I think we should use StringUtils.getUtf8Bytes() instead, as we are using StringUtils.newStringUtf8(Base64.decodeBase64(cmsUserPassBase64)) on the other side (NuageVspResource:192) Otherwise it would fail if StringUtils.getPreferredCharset() is different from UTF-8 |
@fmaximus preffered charset will be utf8 if it is available in the virtual machine (afaik always) otherwise it is the platform default |
1092.test_network.results.txt Note that the two errors test destoying the system VMs. These timeout but the system VMs come back after the timeout.
LGTM |
@DaanHoogland, @fmaximus was right about the encoding. I rewrote that part so we're always using the same encoding :) |
@DaanHoogland, how about the following piece of code then? In this case we are using the public static String encodePassword(String originalPassword) {
byte[] passwordBytes = originalPassword.getBytes(StringUtils.getPreferredCharset());
byte[] encodedPasswordBytes = Base64.encodeBase64(passwordBytes);
return new String(encodedPasswordBytes, StringUtils.getPreferredCharset());
}
public static String decodePassword(String encodedPassword) {
byte[] encodedPasswordBytes = encodedPassword.getBytes(StringUtils.getPreferredCharset());
byte[] passwordBytes = Base64.decodeBase64(encodedPasswordBytes);
return new String(passwordBytes, StringUtils.getPreferredCharset());
} |
@nlivens looks good, but I have some questions still
|
You can have a look at the newly pushed code :) |
@nlivens .1 : my bad .2 remains but is not specific to this patch and even this plugin. LGTM I asked @remibergsma on slack to have a look as well. |
The code seems ok, but what about a PR description and test cases for those encode and decode methods that were created? |
@rafaelweingartner, I've added a test for those methods |
@nvlivens, |
@rafaelweingartner, implemented the test cases as suggested |
The code LGTM now |
@DaanHoogland, @remibergsma, can this be merged in? |
Fix NuageVsp errors for build-master-slowbuild * pr/1092: Fix NuageVsp errors for build-master-slowbuild Signed-off-by: Remi Bergsma <github@remi.nl>
No description provided.