ui: Unbox extra quotes from sessionKey cookie value 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/2013ab38 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2013ab38 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2013ab38 Branch: refs/heads/saml2 Commit: 2013ab38b2aa25b81de82da4bb76084a483079e5 Parents: 4aad626 Author: Rohit Yadav <rohit.ya...@shapeblue.com> Authored: Mon Aug 18 04:20:03 2014 +0200 Committer: Rohit Yadav <rohit.ya...@shapeblue.com> Committed: Sat Aug 23 20:34:39 2014 +0200 ---------------------------------------------------------------------- ui/scripts/cloudStack.js | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2013ab38/ui/scripts/cloudStack.js ---------------------------------------------------------------------- diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index b6dd559..420c137 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -131,6 +131,13 @@ */ g_mySession = $.cookie('JSESSIONID'); g_sessionKey = $.cookie('sessionKey'); + // Unbox quotes from sessionKey cookie value + if (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 + }); + } g_role = $.cookie('role'); g_username = $.cookie('username'); g_userid = $.cookie('userid');