mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-08-26 04:51:54 -05:00
Long expiry of showdown_ssl cookie to avoid a potential issue
This commit is contained in:
@@ -102,7 +102,7 @@ if (isset($PokemonServers[$config['host']])) {
|
||||
};
|
||||
if (/**(!message.teams && !message.prefs) ||**/ $.cookie('showdown_ssl')) {
|
||||
// use the https origin storage
|
||||
$.cookie('showdown_ssl', 1, {expires: 14});
|
||||
$.cookie('showdown_ssl', 1, {expires: 365*3});
|
||||
return executeRedirect();
|
||||
}
|
||||
// copy the existing http storage over to the https origin
|
||||
@@ -113,7 +113,7 @@ if (isset($PokemonServers[$config['host']])) {
|
||||
if (e.data === 'init') {
|
||||
e.source.postMessage($.toJSON(message), origin);
|
||||
} else if (e.data === 'done') {
|
||||
$.cookie('showdown_ssl', 1, {expires: 14});
|
||||
$.cookie('showdown_ssl', 1, {expires: 365*3});
|
||||
localStorage.clear();
|
||||
return executeRedirect();
|
||||
}
|
||||
|
||||
@@ -3786,7 +3786,7 @@ teams = (function() {
|
||||
} else if ((!teams.length && !Object.keys(Tools.prefs.data).length) ||
|
||||
$.cookie('showdown_ssl')) {
|
||||
// use the https domain
|
||||
$.cookie('showdown_ssl', 1, {expires: 14});
|
||||
$.cookie('showdown_ssl', 1, {expires: 365*3});
|
||||
return document.location.replace('https://' + document.location.hostname +
|
||||
document.location.pathname);
|
||||
} else if (window.postMessage) {
|
||||
@@ -3801,7 +3801,7 @@ teams = (function() {
|
||||
prefs: $.toJSON(Tools.prefs.data)
|
||||
}), origin);
|
||||
} else if (e.data === 'done') {
|
||||
$.cookie('showdown_ssl', 1, {expires: 14});
|
||||
$.cookie('showdown_ssl', 1, {expires: 365*3});
|
||||
localStorage.clear();
|
||||
return document.location.replace('https://' + document.location.hostname +
|
||||
document.location.pathname);
|
||||
|
||||
Reference in New Issue
Block a user