Skip to content

Commit 6ee6633

Browse files
authored
ui: call logout before login to clear old sessionkey cookies (#4326)
This handle edge cases of upgrades and when legacy UI is used along with Primate or any UI sharing cookies. The specific case it fixes involves removal of duplicate sessionkey cookies. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 44bc134 commit 6ee6633

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ui/scripts/cloudStack.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,15 @@
280280

281281
var loginCmdText = array1.join("");
282282

283+
// Logout before login is called to purge any duplicate sessionkey cookies
284+
// to handle edge cases around upgrades and using legacy UI with Primate
285+
$.ajax({
286+
url: createURL('logout'),
287+
async: false,
288+
success: function() {},
289+
error: function() {}
290+
});
291+
283292
$.ajax({
284293
type: "POST",
285294
data: "command=login" + loginCmdText + "&response=json",

0 commit comments

Comments
 (0)