modified to specify timeoutAutoAccept flag to win-userconsent
Bryan Roe committed
Feb 22, 2022 at 15:52 UTC
8349d1feae66c4bab2394821f6eafd1687eeebcf
1 file changed
+6
-6
agents/meshcore.js
+6
-6
@@ -2071,11 +2071,11 @@ function onTunnelData(data) {
2071
ipr.consentTitle = consentTitle;
2072
ipr.consentMessage = consentMessage;
2073
ipr.consentTimeout = this.httprequest.consentTimeout;
2074
- ipr.consentAutoAccept = this.httprequest.consentAutoAccept; // TODO: If true, consent timeout must accept.
2074
+ ipr.consentAutoAccept = this.httprequest.consentAutoAccept;
2075
ipr.username = this.httprequest.realname;
2076
ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
2077
this.httprequest.tpromise._consent = ipr.then(function (img) {
2078
- this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: this.consentTimeout * 1000, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
2078
+ 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 });
2079
this.__childPromise.close = this.consent.close.bind(this.consent);
2080
return (this.consent);
2081
});
@@ -2428,12 +2428,12 @@ function onTunnelData(data) {
2428
ipr.consentTitle = consentTitle;
2429
ipr.consentMessage = consentMessage;
2430
ipr.consentTimeout = this.httprequest.consentTimeout;
2431
- ipr.consentAutoAccept = this.httprequest.consentAutoAccept; // TODO: If true, consent timeout must accept.
2431
+ ipr.consentAutoAccept = this.httprequest.consentAutoAccept;
2432
ipr.tsid = tsid;
2433
ipr.username = this.httprequest.realname;
2434
ipr.translation = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
2435
pr = ipr.then(function (img) {
2436
- this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), uid: this.tsid, timeout: this.consentTimeout * 1000, translations: this.translation, background: color_options.background, foreground: color_options.foreground });
2436
+ 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.translation, background: color_options.background, foreground: color_options.foreground });
2437
this.__childPromise.close = this.consent.close.bind(this.consent);
2438
return (this.consent);
2439
});
@@ -2611,11 +2611,11 @@ function onTunnelData(data) {
2611
ipr.consentTitle = consentTitle;
2612
ipr.consentMessage = consentMessage;
2613
ipr.consentTimeout = this.httprequest.consentTimeout;
2614
- ipr.consentAutoAccept = this.httprequest.consentAutoAccept; // TODO: If true, consent timeout must accept.
2614
+ ipr.consentAutoAccept = this.httprequest.consentAutoAccept;
2615
ipr.username = this.httprequest.realname;
2616
ipr.translations = { Allow: currentTranslation['allow'], Deny: currentTranslation['deny'], Auto: currentTranslation['autoAllowForFive'], Caption: consentMessage };
2617
pr = ipr.then(function (img) {
2618
- this.consent = require('win-userconsent').create(this.consentTitle, this.consentMessage, this.username, { b64Image: img.split(',').pop(), timeout: this.consentTimeout * 1000, translations: this.translations, background: color_options.background, foreground: color_options.foreground });
2618
+ 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 });
2619
this.__childPromise.close = this.consent.close.bind(this.consent);
2620
return (this.consent);
2621
});