mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
bug #2037: Check if session cookie has been changed
(cherry picked from commit bab6ea3092)
This commit is contained in:
1 parent
dd6ce8fe3b
commit
02827c69b8
2 files changed
+13
No files matched your search
@@ -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){
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in new issue
Block a user