Skip to content

Commit

Permalink
Long expiry of showdown_ssl cookie to avoid a potential issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cathyjf committed May 2, 2013
1 parent 04b8f84 commit ca6f0a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crossdomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
};
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
Expand All @@ -113,7 +113,7 @@
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();
}
Expand Down
4 changes: 2 additions & 2 deletions js/sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit ca6f0a1

Please sign in to comment.