Minor fixes

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


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

Branch: refs/heads/master
Commit: a364054db60e1a91c5fb671616783b1db9deb590
Parents: 2464e02
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
Authored: Mon Aug 18 04:31:46 2014 +0200
Committer: Rohit Yadav <rohit.ya...@shapeblue.com>
Committed: Thu Aug 28 19:45:21 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java | 2 +-
 ui/scripts/cloudStack.js                                         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a364054d/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java 
b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
index 1f88c1c..ce97cfd 100644
--- a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
+++ b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
@@ -325,7 +325,7 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd 
implements APIAuthent
                             resp.addCookie(new Cookie("sessionKey", 
URLEncoder.encode(loginResponse.getSessionKey(), HttpUtils.UTF_8)));
                             resp.addCookie(new Cookie("account", 
URLEncoder.encode(loginResponse.getAccount(), HttpUtils.UTF_8)));
                             resp.addCookie(new Cookie("timezone", 
URLEncoder.encode(loginResponse.getTimeZone(), HttpUtils.UTF_8)));
-                            resp.addCookie(new Cookie("userfullname", 
URLEncoder.encode(loginResponse.getFirstName() + " " + 
loginResponse.getLastName(), HttpUtils.UTF_8)));
+                            resp.addCookie(new Cookie("userfullname", 
loginResponse.getFirstName() + "%20" + loginResponse.getLastName()));
                             resp.sendRedirect("http://localhost:8080/client";);
                             return 
ApiResponseSerializer.toSerializedString(loginResponse, responseType);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a364054d/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 420c137..edc7c21 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -132,7 +132,7 @@
                     g_mySession = $.cookie('JSESSIONID');
                     g_sessionKey = $.cookie('sessionKey');
                     // Unbox quotes from sessionKey cookie value
-                    if (g_sessionKey[0] === '"' && 
g_sessionKey[g_sessionKey.length-1] === '"') {
+                    if (g_sessionKey && g_sessionKey[0] === '"' && 
g_sessionKey[g_sessionKey.length-1] === '"') {
                         g_sessionKey = g_sessionKey.slice(1, 
g_sessionKey.length-1);
                         $.cookie('sessionKey', g_sessionKey, {
                             expires: 1

Reply via email to