From ca6f0a1e8456b9ab06ecdecf513fdce0f0db91d2 Mon Sep 17 00:00:00 2001 From: "Cathy J. Fitzpatrick" Date: Wed, 1 May 2013 19:18:38 -0600 Subject: [PATCH] Long expiry of `showdown_ssl` cookie to avoid a potential issue --- crossdomain.php | 4 ++-- js/sim.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crossdomain.php b/crossdomain.php index ab857c8f3..835728e03 100644 --- a/crossdomain.php +++ b/crossdomain.php @@ -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(); } diff --git a/js/sim.js b/js/sim.js index b5d8e8179..ce29b63f0 100644 --- a/js/sim.js +++ b/js/sim.js @@ -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);