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 2014/08/18 11:43:47 UTC

[22/22] git commit: updated refs/heads/saml2 to 54986d5

Minor fixes

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

Branch: refs/heads/saml2
Commit: 60e841350533a2e2c7e5e3e71672d56b74f94031
Parents: ce285f6
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Aug 18 04:31:46 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Aug 18 11:42:35 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/60e84135/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/60e84135/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