You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2015/03/04 11:06:14 UTC

[30/50] [abbrv] git commit: updated refs/heads/reporter to 178a938

pbkdf2: fix encoding issue when converting byte[] to String

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit 814e5574dcabbbf52b878d9fd448be7a66118597)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/694a6948
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/694a6948
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/694a6948

Branch: refs/heads/reporter
Commit: 694a6948600aec8584d02ab8dc00d6642b46e3c7
Parents: 3786aa0
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sat Feb 28 00:42:27 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Sat Feb 28 00:44:20 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/694a6948/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 {