mirror of https://github.com/apache/cloudstack.git
ui: Unbox extra quotes from sessionKey cookie value
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
2694ad7bd9
commit
9b1a6dac4a
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue