1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

add oldStyle to consentMessages as workaround for win-userconsent crashing #6290

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-09-10 11:01:23 +01:00
parent 9e309584db
commit 1d04a13a64
6 changed files with 23 additions and 4 deletions

View file

@ -1158,6 +1158,7 @@ function handleServerCommand(data) {
tunnel.soptions = data.soptions;
tunnel.consentTimeout = (tunnel.soptions && tunnel.soptions.consentTimeout) ? tunnel.soptions.consentTimeout : 30;
tunnel.consentAutoAccept = (tunnel.soptions && (tunnel.soptions.consentAutoAccept === true));
tunnel.oldStyle = (tunnel.soptions && tunnel.soptions.oldStyle) ? tunnel.soptions.oldStyle : false;
tunnel.tcpaddr = data.tcpaddr;
tunnel.tcpport = data.tcpport;
tunnel.udpaddr = data.udpaddr;
@ -2836,7 +2837,9 @@ function onTunnelData(data)
if (process.platform == 'win32')
{
var enhanced = false;
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
if (this.httprequest.oldStyle === false) {
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
}
if (enhanced)
{
var ipr = server_getUserImage(this.httprequest.userid);
@ -3000,7 +3003,9 @@ function onTunnelData(data)
if (process.platform == 'win32')
{
var enhanced = false;
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
if (this.httprequest.oldStyle === false) {
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
}
if (enhanced)
{
var ipr = server_getUserImage(this.httprequest.userid);
@ -3153,7 +3158,9 @@ function onTunnelData(data)
if (process.platform == 'win32')
{
var enhanced = false;
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
if (this.httprequest.oldStyle === false) {
try { require('win-userconsent'); enhanced = true; } catch (ex) { }
}
if (enhanced)
{
var ipr = server_getUserImage(this.httprequest.userid);