This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-102.4.0esr-12.0-2 in repository tor-browser.
commit 0168fede1a2c28eaa0f84caf32cab61f773ff467 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Mon Nov 14 16:42:29 2022 +0100
fixup! Bug 30237: Add v3 onion services client authentication prompt
Bug 41449: Use the offline manual page for onion authentication --- browser/components/onionservices/content/authPreferences.js | 3 +++ browser/components/onionservices/content/authPrompt.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/browser/components/onionservices/content/authPreferences.js b/browser/components/onionservices/content/authPreferences.js index 5afd7d0dd474..e84938285e65 100644 --- a/browser/components/onionservices/content/authPreferences.js +++ b/browser/components/onionservices/content/authPreferences.js @@ -43,6 +43,9 @@ const OnionServicesAuthPreferences = { elem = groupbox.querySelector(this.selector.learnMore); elem.setAttribute("value", TorStrings.onionServices.learnMore); elem.setAttribute("href", TorStrings.onionServices.learnMoreURL); + if (TorStrings.onionServices.learnMoreURL.startsWith("about:")) { + elem.setAttribute("useoriginprincipal", "true"); + }
elem = groupbox.querySelector(this.selector.savedKeysButton); elem.setAttribute( diff --git a/browser/components/onionservices/content/authPrompt.js b/browser/components/onionservices/content/authPrompt.js index 771c7e58f667..83831ef732c2 100644 --- a/browser/components/onionservices/content/authPrompt.js +++ b/browser/components/onionservices/content/authPrompt.js @@ -118,6 +118,9 @@ const OnionAuthPrompt = (function() { "href", TorStrings.onionServices.learnMoreURL ); + if (TorStrings.onionServices.learnMoreURL.startsWith("about:")) { + learnMoreElem.setAttribute("useoriginprincipal", "true"); + } }
this._showWarning(aWarningMessage); @@ -196,7 +199,9 @@ const OnionAuthPrompt = (function() { // ^(subdomain.)*onionserviceid.onion$ (case-insensitive) const onionServiceIdRegExp = /^(.*.)*(?<onionServiceId>[a-z2-7]{56}).onion$/i; // match() will return null on bad match, causing throw - const onionServiceId = this._onionHostname.match(onionServiceIdRegExp).groups.onionServiceId.toLowerCase(); + const onionServiceId = this._onionHostname + .match(onionServiceIdRegExp) + .groups.onionServiceId.toLowerCase();
let checkboxElem = this._getCheckboxElement(); let isPermanent = checkboxElem && checkboxElem.checked;