mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 02:51:50 +00:00
fix remote desktop consent for rdp sessions #6710
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
d246307fae
commit
9fd40751b2
1 changed files with 17 additions and 3 deletions
|
@ -2318,9 +2318,10 @@ function terminal_consent_ask(ws) {
|
|||
ipr.consentTimeout = ws.httprequest.consentTimeout;
|
||||
ipr.consentAutoAccept = ws.httprequest.consentAutoAccept;
|
||||
ipr.username = ws.httprequest.realname;
|
||||
ipr.tsid = ws.tsid;
|
||||
ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
|
||||
ws.httprequest.tpromise._consent = ipr.then(function (img) {
|
||||
this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: this.consentTimeout * 1000, timeoutAutoAccept: this.consentAutoAccept, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
|
||||
this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), uid: this.tsid, timeout: this.consentTimeout * 1000, timeoutAutoAccept: this.consentAutoAccept, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
|
||||
this.__childPromise.close = this.consent.close.bind(this.consent);
|
||||
return (this.consent);
|
||||
});
|
||||
|
@ -2736,7 +2737,7 @@ function kvm_consent_ask(ws){
|
|||
ipr.consentMessage = consentMessage;
|
||||
ipr.consentTimeout = ws.httprequest.consentTimeout;
|
||||
ipr.consentAutoAccept = ws.httprequest.consentAutoAccept;
|
||||
ipr.tsid = this.tsid;
|
||||
ipr.tsid = ws.tsid;
|
||||
ipr.username = ws.httprequest.realname;
|
||||
ipr.translation = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
|
||||
pr = ipr.then(function (img) {
|
||||
|
@ -2877,9 +2878,10 @@ function files_consent_ask(ws){
|
|||
ipr.consentTimeout = ws.httprequest.consentTimeout;
|
||||
ipr.consentAutoAccept = ws.httprequest.consentAutoAccept;
|
||||
ipr.username = ws.httprequest.realname;
|
||||
ipr.tsid = ws.tsid;
|
||||
ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
|
||||
pr = ipr.then(function (img) {
|
||||
this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: this.consentTimeout * 1000, timeoutAutoAccept: this.consentAutoAccept, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
|
||||
this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), uid: this.tsid, timeout: this.consentTimeout * 1000, timeoutAutoAccept: this.consentAutoAccept, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
|
||||
this.__childPromise.close = this.consent.close.bind(this.consent);
|
||||
return (this.consent);
|
||||
});
|
||||
|
@ -3009,6 +3011,12 @@ function onTunnelData(data)
|
|||
|
||||
this.descriptorMetadata = "Remote Terminal";
|
||||
|
||||
// Look for a TSID
|
||||
var tsid = null;
|
||||
if ((this.httprequest.xoptions != null) && (typeof this.httprequest.xoptions.tsid == 'number')) { tsid = this.httprequest.xoptions.tsid; }
|
||||
require('MeshAgent')._tsid = tsid;
|
||||
this.tsid = tsid;
|
||||
|
||||
if (process.platform == 'win32')
|
||||
{
|
||||
if (!require('win-terminal').PowerShellCapable() && (this.httprequest.protocol == 6 || this.httprequest.protocol == 9)) {
|
||||
|
@ -3193,6 +3201,12 @@ function onTunnelData(data)
|
|||
|
||||
this.descriptorMetadata = "Remote Files";
|
||||
|
||||
// Look for a TSID
|
||||
var tsid = null;
|
||||
if ((this.httprequest.xoptions != null) && (typeof this.httprequest.xoptions.tsid == 'number')) { tsid = this.httprequest.xoptions.tsid; }
|
||||
require('MeshAgent')._tsid = tsid;
|
||||
this.tsid = tsid;
|
||||
|
||||
// Add the files session to the count to update the server
|
||||
if (this.httprequest.userid != null) {
|
||||
var userid = getUserIdAndGuestNameFromHttpRequest(this.httprequest);
|
||||
|
|
Loading…
Reference in a new issue