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

git commit: updated refs/heads/4.5 to 19cc5eb

Repository: cloudstack
Updated Branches:
  refs/heads/4.5 f8e1ff12a -> 19cc5eb9e


schema: Encode URL safe random vnc password string

/+= may break on some environments, url safe encoded passwords will have -_,
characters which are more acceptable

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/19cc5eb9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/19cc5eb9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/19cc5eb9

Branch: refs/heads/4.5
Commit: 19cc5eb9e6f1b5127bf01e4c1ae061875e61cb4c
Parents: f8e1ff1
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Jun 1 14:10:54 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Jun 1 14:10:54 2015 +0200

----------------------------------------------------------------------
 engine/schema/src/com/cloud/vm/VMInstanceVO.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19cc5eb9/engine/schema/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/VMInstanceVO.java b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
index d542f33..3d2c3af 100644
--- a/engine/schema/src/com/cloud/vm/VMInstanceVO.java
+++ b/engine/schema/src/com/cloud/vm/VMInstanceVO.java
@@ -206,7 +206,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
             SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
             byte[] randomBytes = new byte[16];
             random.nextBytes(randomBytes);
-            vncPassword = Base64.encodeBase64String(randomBytes);
+            vncPassword = Base64.encodeBase64URLSafeString(randomBytes);
         } catch (NoSuchAlgorithmException e) {
             s_logger.error("Unexpected exception in SecureRandom Algorithm selection ", e);
         }