Repository: cloudstack Updated Branches: refs/heads/4.5 dd5fb2ebd -> 814e5574d
pbkdf2: fix encoding issue when converting byte[] to String Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/814e5574 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/814e5574 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/814e5574 Branch: refs/heads/4.5 Commit: 814e5574dcabbbf52b878d9fd448be7a66118597 Parents: dd5fb2e Author: Rohit Yadav <[email protected]> Authored: Sat Feb 28 00:42:27 2015 +0530 Committer: Rohit Yadav <[email protected]> Committed: Sat Feb 28 00:42:27 2015 +0530 ---------------------------------------------------------------------- .../apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/814e5574/plugins/user-authenticators/pbkdf2/src/org/apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java ---------------------------------------------------------------------- diff --git a/plugins/user-authenticators/pbkdf2/src/org/apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java b/plugins/user-authenticators/pbkdf2/src/org/apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java index 43c32c7..58f5ea2 100644 --- a/plugins/user-authenticators/pbkdf2/src/org/apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java +++ b/plugins/user-authenticators/pbkdf2/src/org/apache/cloudstack/server/auth/PBKDF2UserAuthenticator.java @@ -133,8 +133,8 @@ public class PBKDF2UserAuthenticator extends DefaultUserAuthenticator { return !(plainPassword == null || plainPassword.isEmpty() || hash == null || hash.length == 0); } - private static String encode(byte[] input) { - return new String(Base64.encode(input)); + private static String encode(byte[] input) throws UnsupportedEncodingException { + return new String(Base64.encode(input), "UTF-8"); } private static byte[] decode(String input) throws UnsupportedEncodingException {
