From b9066103d5a5bfbf2ec6328779e46e20841e6514 Mon Sep 17 00:00:00 2001 From: ljm42 Date: Sun, 6 Sep 2020 19:05:57 -0700 Subject: [PATCH] Detect invalid session and logout current tab If the request to Notify.php was redirected to the login page, redirect the current tab there as well. --- plugins/dynamix/include/DefaultPageLayout.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index b26d3a91d..bfcf35298 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -303,6 +303,10 @@ function openUpgrade() { function notifier() { var tub1 = 0, tub2 = 0, tub3 = 0; $.post('/webGui/include/Notify.php',{cmd:'get'},function(json) { + if (json && /^/.test(json)) { + // Session is invalid, user has logged out from another tab + $(location).attr('href','/'); + } var data = $.parseJSON(json); $.each(data, function(i, notify) {