1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-13 12:58:17 +03:00

bug #2037: Check if session cookie has been changed

This commit is contained in:
Daniel Molina 2013-05-14 12:34:09 +02:00
parent 4b964caa56
commit bab6ea3092
2 changed files with 13 additions and 0 deletions

View File

@ -483,6 +483,7 @@ var OpenNebula = {
url: "logout",
type: "POST",
success: function(response){
$.cookie("one-user", null);
return callback ? callback(request, response) : null;
},
error: function(response){

View File

@ -14,6 +14,18 @@
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
var user_cookie = $.cookie("one-user");
setInterval(function(){
var new_cookie = $.cookie("one-user");
if ((new_cookie == null) || (new_cookie !== user_cookie)) {
window.location.href='/';
} else {
user_cookie = new_cookie
}
},5000);
Config = {
"isTabEnabled": function(tab_name){