From c6f4112f2269516f506648f5408694889935bcfe Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 12 Dec 2019 11:03:33 -0800 Subject: [PATCH] Fixed decodeCookie() --- meshcentral.js | 2 +- package.json | 2 +- views/default-min.handlebars | 6 +++++- views/translations/default-min_cs.handlebars | 6 +++++- views/translations/default-min_fr.handlebars | 6 +++++- views/translations/default-min_ja.handlebars | 6 +++++- views/translations/default-min_pt.handlebars | 6 +++++- views/translations/default_cs.handlebars | 6 +++++- views/translations/default_fr.handlebars | 6 +++++- views/translations/default_ja.handlebars | 6 +++++- views/translations/default_pt.handlebars | 6 +++++- 11 files changed, 47 insertions(+), 11 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index aea81d70..e05afd37 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -1858,7 +1858,7 @@ function CreateMeshCentralServer(config, args) { // Decode a cookie back into an object using a key using AES256-GCM or AES128-CBC/HMAC-SHA386. Return null if it's not a valid cookie. (key must be 32 bytes or more) obj.decodeCookie = function (cookie, key, timeout) { - const r = obj.decodeCookieAESGCM(cookie, key, timeout); + var r = obj.decodeCookieAESGCM(cookie, key, timeout); if (r == null) { r = obj.decodeCookieAESSHA(cookie, key, timeout); } if ((r != null) && (typeof r.once == 'string') && (r.once.length > 0)) { // This cookie must only be used once. diff --git a/package.json b/package.json index ac0f6074..65b5d472 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.4.5-r", + "version": "0.4.5-s", "keywords": [ "Remote Management", "Intel AMT", diff --git a/views/default-min.handlebars b/views/default-min.handlebars index 6f60d78d..622b1a4d 100644 --- a/views/default-min.handlebars +++ b/views/default-min.handlebars @@ -3570,7 +3570,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default-min_cs.handlebars b/views/translations/default-min_cs.handlebars index e60e0c89..8d4cb16a 100644 --- a/views/translations/default-min_cs.handlebars +++ b/views/translations/default-min_cs.handlebars @@ -3570,7 +3570,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default-min_fr.handlebars b/views/translations/default-min_fr.handlebars index 9ae34083..d5d73bf2 100644 --- a/views/translations/default-min_fr.handlebars +++ b/views/translations/default-min_fr.handlebars @@ -3570,7 +3570,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default-min_ja.handlebars b/views/translations/default-min_ja.handlebars index 1b04ae76..94294206 100644 --- a/views/translations/default-min_ja.handlebars +++ b/views/translations/default-min_ja.handlebars @@ -3570,7 +3570,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default-min_pt.handlebars b/views/translations/default-min_pt.handlebars index 31197094..844f3468 100644 --- a/views/translations/default-min_pt.handlebars +++ b/views/translations/default-min_pt.handlebars @@ -3570,7 +3570,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default_cs.handlebars b/views/translations/default_cs.handlebars index 0411261f..af9996ba 100644 --- a/views/translations/default_cs.handlebars +++ b/views/translations/default_cs.handlebars @@ -4579,7 +4579,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default_fr.handlebars b/views/translations/default_fr.handlebars index 235e1a3d..89d1e838 100644 --- a/views/translations/default_fr.handlebars +++ b/views/translations/default_fr.handlebars @@ -4579,7 +4579,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default_ja.handlebars b/views/translations/default_ja.handlebars index a501b5b3..f1c1c480 100644 --- a/views/translations/default_ja.handlebars +++ b/views/translations/default_ja.handlebars @@ -4579,7 +4579,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10; diff --git a/views/translations/default_pt.handlebars b/views/translations/default_pt.handlebars index 5f66aab1..b41b4d1c 100644 --- a/views/translations/default_pt.handlebars +++ b/views/translations/default_pt.handlebars @@ -4579,7 +4579,11 @@ p13clearConsoleMsg(); // Device refresh plugin handler - if (pluginHandler != null) { pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); } + if (pluginHandler != null) { + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event); + var lastTab = getstore('_curPluginPage', null); + if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab)); + } } setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching. if (!panel) panel = 10;