diff --git a/ChangeLog b/ChangeLog index 5f0c22b491..8a61e7353c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ phpMyAdmin - ChangeLog - issue #11633 CodeMirror tooltip shows below modal window - issue #11639 Bug with the MainBackground Color - issue Profiling checkbox is missing +- issue #11642 Properly handle session expiry after POST requests 4.5.1.0 (2015-10-23) - issue Invalid argument supplied for foreach() diff --git a/js/ajax.js b/js/ajax.js index 3800c0d1b4..d047173ea9 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -490,7 +490,11 @@ var AJAX = { AJAX.xhr = null; if (parseInt(data.redirect_flag) == 1) { // add one more GET param to display session expiry msg - window.location.href += '&session_expired=1'; + if (window.location.href.indexOf('?') === -1) { + window.location.href += '?session_expired=1'; + } else { + window.location.href += '&session_expired=1'; + } window.location.reload(); } else if (parseInt(data.reload_flag) == 1) { // remove the token param and reload diff --git a/js/navigation.js b/js/navigation.js index d1b6872ce4..f406734d22 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -78,7 +78,11 @@ function loadChildNodes(isNode, $expandElem, callback) { callback(data); } } else if(data.redirect_flag == "1") { - window.location.href += '&session_expired=1'; + if (window.location.href.indexOf('?') === -1) { + window.location.href += '?session_expired=1'; + } else { + window.location.href += '&session_expired=1'; + } window.location.reload(); } else { var $throbber = $expandElem.find('img.throbber');