[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-91.7.0esr-11.0-1] fixup! Bug 30237: Add v3 onion services client authentication prompt
commit 77c894e17f9fac22e40834c590be39d2fefd0cc1
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
Date: Mon Mar 7 19:40:10 2022 +0100
fixup! Bug 30237: Add v3 onion services client authentication prompt
Fixes a problem with an async function not awaited, that caused #40802.
---
browser/components/onionservices/content/authPrompt.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/browser/components/onionservices/content/authPrompt.js b/browser/components/onionservices/content/authPrompt.js
index d4a59ac46487..df609df44e49 100644
--- a/browser/components/onionservices/content/authPrompt.js
+++ b/browser/components/onionservices/content/authPrompt.js
@@ -154,7 +154,7 @@ const OnionAuthPrompt = (function() {
this._showWarning(undefined); // Remove the warning.
},
- _onDone() {
+ async _onDone() {
let keyElem = this._getKeyElement();
if (!keyElem)
return;
@@ -173,7 +173,8 @@ const OnionAuthPrompt = (function() {
try {
let { controller } =
Cu.import("resource://torbutton/modules/tor-control-port.js", {});
- let torController = controller(aError => {
+ let torController = await controller(aError => {
+ console.error(controllerFailureMsg, aError);
this.show(controllerFailureMsg);
});
let onionAddr = this._onionName.toLowerCase().replace(/\.onion$/, "");
@@ -189,12 +190,15 @@ const OnionAuthPrompt = (function() {
);
})
.catch(aError => {
- if (aError.torMessage)
+ if (aError.torMessage) {
this.show(aError.torMessage);
- else
+ } else {
+ console.error(controllerFailureMsg, aError);
this.show(controllerFailureMsg);
+ }
});
} catch (e) {
+ console.error(controllerFailureMsg, e);
this.show(controllerFailureMsg);
}
},
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits