lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 21329 discussions
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27511: Add new identity button to toolbar
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 44366fa77489aef77fc739942db3697408e2e868 Author: Richard Pospesel <richard(a)torproject.org> Date: Fri Sep 17 12:14:05 2021 -0500 fixup! Bug 27511: Add new identity button to toolbar --- browser/themes/shared/icons/new_circuit.svg | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/browser/themes/shared/icons/new_circuit.svg b/browser/themes/shared/icons/new_circuit.svg index e0a93cc83502..ddc819946818 100644 --- a/browser/themes/shared/icons/new_circuit.svg +++ b/browser/themes/shared/icons/new_circuit.svg @@ -1,8 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?> <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>Icon / New Circuit(a)1.5x</title> - <g id="Icon-/-New-Circuit" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> - <path d="M13.4411138,10.1446317 L9.5375349,10.1446317 C8.99786512,10.1446317 8.56164018,10.5818326 8.56164018,11.1205264 C8.56164018,11.6592203 8.99786512,12.0964212 9.5375349,12.0964212 L11.4571198,12.0964212 C10.7554515,13.0479185 9.73466563,13.692009 8.60067597,13.9359827 C8.41818366,13.9720908 8.23276366,14.0033194 8.04734366,14.0218614 C7.97219977,14.0277168 7.89803177,14.0306445 7.82288788,14.0335722 C6.07506044,14.137017 4.290149,13.4499871 3.38647049,11.857327 C2.52280367,10.3349312 2.77263271,8.15966189 3.93687511,6.87343267 C5.12453898,5.56183017 7.44814431,5.04363008 8.21226987,3.38558497 C9.01738301,4.92847451 9.60682342,5.02801577 10.853041,6.15029468 C11.2892659,6.54455615 11.9704404,7.55558307 12.1861132,8.10501179 C12.3051723,8.40949094 12.5013272,9.17947187 12.5013272,9.17947187 L14.2862386,9.17947187 C14.2091429,7.59754654 13.439162,5.96877827 12.2261248,4.93628166 C11.279507,4.13116853 10.5065984,3.84718317 9.77662911,2.8088312 C9.63219669,2.60194152 9.599 99216,2.4565332 9.56290816,2.21646311 C9.53851079,2.00762164 9.54143848,1.78511764 9.62048595,1.53919218 C9.65952174,1.41720534 9.59804037,1.28545955 9.47702943,1.23764071 L6.40296106,0.0167964277 C6.32391359,-0.0134563083 6.23413128,-0.00272146652 6.16679454,0.0480250584 L5.95502539,0.206120002 C5.85743592,0.280288 5.82815908,0.416913259 5.89159223,0.523285783 C6.70060895,1.92564648 6.36978064,2.82542141 5.8984235,3.20211676 C5.4914754,3.4900057 4.99084141,3.72226864 4.63366394,3.95453159 C3.82367132,4.47956294 3.03222071,5.02508808 2.40374451,5.76774396 C0.434388969,8.09427695 0.519291809,12.0046871 2.77165682,14.1077402 C3.65288975,14.9284676 4.70295247,15.4749686 5.81742423,15.7570022 C5.81742423,15.7570022 6.13556591,15.833122 6.21754107,15.8497122 C7.36616915,16.0829511 8.53529102,16.0146384 9.62243774,15.6672199 C9.67416016,15.6525815 9.77174963,15.620377 9.76784605,15.6154975 C10.7730176,15.2700308 11.7049971,14.7010841 12.4652191,13.90573 L12.4652191,15.0241053 C12.4652191, 15.5627992 12.901444,16 13.4411138,16 C13.9798077,16 14.4170085,15.5627992 14.4170085,15.0241053 L14.4170085,11.1205264 C14.4170085,10.5818326 13.9798077,10.1446317 13.4411138,10.1446317" id="Fill-3" fill="context-fill" fill-opacity="context-fill-opacity"></path> - <path d="M5.107,7.462 C4.405,8.078 4,8.946 4,9.839 C4,10.712 4.422,11.57 5.13,12.132 C5.724,12.607 6.627,12.898 7.642,12.949 L7.642,5.8 C7.39,6.029 7.103,6.227 6.791,6.387 C5.993,6.812 5.489,7.133 5.107,7.462" id="Fill-1" fill="context-fill" fill-opacity="context-fill-opacity"></path> + <g stroke="none" stroke-width="1" fill="context-fill" fill-rule="evenodd" opacity="context-fill-opacity"> + <path d="m10.707 6h3.993l.3-.3v-3.993c.0002-.09902-.0291-.19586-.084-.27825s-.1331-.14661-.2245-.18453c-.0915-.03792-.1922-.04782-.2893-.02845-.0971.01936-.1863.06713-.2562.13723l-1.459 1.459c-1.2817-1.16743-2.95335-1.813714-4.687-1.812-3.859 0-7 3.141-7 7s3.141 7 7 7c1.74123.007 3.422-.6379 4.7116-1.8079 1.2896-1.1701 2.0945-2.7804 2.2564-4.5141.0156-.1649-.0348-.32927-.1401-.4571s-.2571-.2087-.4219-.2249c-.1644-.01324-.3275.03801-.4548.1429s-.2088.2552-.2272.4191c-.1334 1.42392-.7948 2.7464-1.854 3.7072-1.0593.9609-2.43986 1.4905-3.87 1.4848-3.171 0-5.75-2.579-5.75-5.75s2.579-5.75 5.75-5.75c1.40277-.00207 2.7572.5123 3.805 1.445l-1.451 1.451c-.07.06987-.1178.15895-.1372.25597-.0194.09701-.0096.1976.0282.28903.0378.09144.1019.1696.1841.22461.0823.055.179.08437.2779.08439z"/> + <path d="m8 12.5c-2.48528 0-4.5-2.0147-4.5-4.5 0-2.48528 2.01472-4.5 4.5-4.5z"/> </g> </svg>
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27477: Implement about:torconnect captive portal within Tor Browser
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 67e4e06d45d415c815f6b7c45d6a22b92379c384 Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Sep 3 03:52:25 2021 +0000 fixup! Bug 27477: Implement about:torconnect captive portal within Tor Browser This reverts commit ff3b679987ee9d5515508d94d78ed28166706249. --- .../components/torpreferences/content/torPane.js | 9 +++++---- browser/modules/TorConnect.jsm | 23 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/browser/components/torpreferences/content/torPane.js b/browser/components/torpreferences/content/torPane.js index cde424a3f32a..afdb27351831 100644 --- a/browser/components/torpreferences/content/torPane.js +++ b/browser/components/torpreferences/content/torPane.js @@ -159,10 +159,11 @@ const gTorPane = (function() { this._messageBoxButton = prefpane.querySelector(selectors.messageBox.button); // wire up connect button this._messageBoxButton.addEventListener("click", () => { - TorConnect.beginBootstrap(); - let win = Services.wm.getMostRecentWindow("navigator:browser"); - // switch to existing about:torconnect tab or create a new one - win.switchToTabHavingURI("about:torconnect", true); + TorConnect.beginBootstrap().then((result) => { + let win = Services.wm.getMostRecentWindow("navigator:browser"); + // switch to existing about:torconnect tab or create a new one + win.switchToTabHavingURI("about:torconnect", true); + }); }); let populateMessagebox = () => { diff --git a/browser/modules/TorConnect.jsm b/browser/modules/TorConnect.jsm index 17a786dc31f0..6444ab39e928 100644 --- a/browser/modules/TorConnect.jsm +++ b/browser/modules/TorConnect.jsm @@ -167,19 +167,19 @@ const TorConnect = (() => { /* Initial is never transitioned to */ [TorConnectState.Initial, null], /* Configuring */ - [TorConnectState.Configuring, (self, prevState) => { + [TorConnectState.Configuring, async (self, prevState) => { // TODO move this to the transition function if (prevState === TorConnectState.Bootstrapping) { - TorProtocolService.torStopBootstrap(); + await TorProtocolService.torStopBootstrap(); } }], /* AutoConfiguring */ - [TorConnectState.AutoConfiguring, (self, prevState) => { + [TorConnectState.AutoConfiguring, async (self, prevState) => { }], /* Bootstrapping */ - [TorConnectState.Bootstrapping, (self, prevState) => { - let error = TorProtocolService.connect(); + [TorConnectState.Bootstrapping, async (self, prevState) => { + let error = await TorProtocolService.connect(); if (error) { self.onError(error.message, error.details); } else { @@ -187,12 +187,12 @@ const TorConnect = (() => { } }], /* Bootstrapped */ - [TorConnectState.Bootstrapped, (self,prevState) => { + [TorConnectState.Bootstrapped, async (self,prevState) => { // notify observers of bootstrap completion Services.obs.notifyObservers(null, TorConnectTopics.BootstrapComplete); }], /* Error */ - [TorConnectState.Error, (self, prevState, errorMessage, errorDetails, fatal) => { + [TorConnectState.Error, async (self, prevState, errorMessage, errorDetails, fatal) => { self._errorMessage = errorMessage; self._errorDetails = errorDetails; @@ -204,7 +204,7 @@ const TorConnect = (() => { } }], /* FatalError */ - [TorConnectState.FatalError, (self, prevState) => { + [TorConnectState.FatalError, async (self, prevState) => { Services.obs.notifyObservers(null, TorConnectTopics.FatalError); }], /* Disabled */ @@ -213,7 +213,7 @@ const TorConnect = (() => { }], ])), - _changeState: function(newState, ...args) { + _changeState: async function(newState, ...args) { const prevState = this._state; // ensure this is a valid state transition @@ -228,7 +228,7 @@ const TorConnect = (() => { this._state = newState; // call our transition function and forward any args - this._transitionCallbacks.get(newState)(this, prevState, ...args); + await this._transitionCallbacks.get(newState)(this, prevState, ...args); Services.obs.notifyObservers({state: newState}, TorConnectTopics.StateChange); }, @@ -306,8 +306,7 @@ const TorConnect = (() => { /* Handle bootstrap error*/ case TorTopics.BootstrapError: { const obj = subject?.wrappedJSObject; - TorProtocolService.torStopBootstrap(); - this.onError(obj.message, obj.details); + TorProtocolService.torStopBootstrap().then(() => this.onError(obj.message, obj.details)); break; } case TorTopics.LogHasWarnOrErr: {
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 23247: Communicating security expectations for .onion
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 2304d0433d59489b3223bc442dbef718974378df Author: Richard Pospesel <richard(a)torproject.org> Date: Fri Sep 17 14:01:26 2021 -0500 fixup! Bug 23247: Communicating security expectations for .onion --- .../themes/shared/identity-block/identity-block.inc.css | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/browser/themes/shared/identity-block/identity-block.inc.css b/browser/themes/shared/identity-block/identity-block.inc.css index 283fc2113e2f..90fb46169bb0 100644 --- a/browser/themes/shared/identity-block/identity-block.inc.css +++ b/browser/themes/shared/identity-block/identity-block.inc.css @@ -212,21 +212,21 @@ toolbar[brighttext] #identity-box[pageproxystate="valid"].chromeUI #identity-ico list-style-image: url(chrome://global/skin/icons/security-broken.svg); } -#identity-box[pageproxystate="valid"].onionUnknownIdentity > #identity-icon, -#identity-box[pageproxystate="valid"].onionVerifiedDomain > #identity-icon, -#identity-box[pageproxystate="valid"].onionMixedActiveBlocked > #identity-icon { +#identity-box[pageproxystate="valid"].onionUnknownIdentity #identity-icon, +#identity-box[pageproxystate="valid"].onionVerifiedDomain #identity-icon, +#identity-box[pageproxystate="valid"].onionMixedActiveBlocked #identity-icon { list-style-image: url(chrome://browser/skin/onion.svg); visibility: visible; } -#identity-box[pageproxystate="valid"].onionMixedDisplayContent > #identity-icon, -#identity-box[pageproxystate="valid"].onionMixedDisplayContentLoadedActiveBlocked > #identity-icon, -#identity-box[pageproxystate="valid"].onionCertUserOverridden > #identity-icon { +#identity-box[pageproxystate="valid"].onionMixedDisplayContent #identity-icon, +#identity-box[pageproxystate="valid"].onionMixedDisplayContentLoadedActiveBlocked #identity-icon, +#identity-box[pageproxystate="valid"].onionCertUserOverridden #identity-icon { list-style-image: url(chrome://browser/skin/onion-warning.svg); visibility: visible; } -#identity-box[pageproxystate="valid"].onionMixedActiveContent > #identity-icon { +#identity-box[pageproxystate="valid"].onionMixedActiveContent #identity-icon { list-style-image: url(chrome://browser/skin/onion-slash.svg); visibility: visible; }
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 10760: Integrate TorButton to TorBrowser core
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit b5c9e24501057382337dc9276af616e495523e9d Author: Richard Pospesel <richard(a)torproject.org> Date: Mon Sep 20 15:54:39 2021 -0500 fixup! Bug 10760: Integrate TorButton to TorBrowser core --- .../controlcenter/content/identityPanel.inc.xhtml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/browser/components/controlcenter/content/identityPanel.inc.xhtml b/browser/components/controlcenter/content/identityPanel.inc.xhtml index 0735661e274c..06511866ae29 100644 --- a/browser/components/controlcenter/content/identityPanel.inc.xhtml +++ b/browser/components/controlcenter/content/identityPanel.inc.xhtml @@ -93,21 +93,26 @@ </hbox> <!-- Circuit display section --> - <hbox id="circuit-display-container" class="identity-popup-section"> - <vbox id="circuit-display-content" flex="1" role="group" + + <vbox id="circuit-display-container" class="identity-popup-section"> + <toolbarseparator/> + <vbox id="circuit-display-header" flex="1" role="group" aria-labelledby="circuit-display-headline"> - <hbox id="circuit-display-header" align="center"> + <hbox flex="1"> <label id="circuit-display-headline" role="heading" aria-level="2">&torbutton.circuit_display.title;</label> </hbox> - <html:ul id="circuit-display-nodes" dir="auto"/> </vbox> - <vbox id="circuit-reload-content" flex="1"> - <html:button id="circuit-reload-button" - onclick="torbutton_new_circuit()">&torbutton.circuit_display.new_circuit;</html:button> + <vbox id="circuit-display-content"> + <html:ul id="circuit-display-nodes" dir="auto"/> <hbox id="circuit-guard-note-container"/> + <hbox id="circuit-reload-button-container"> + <html:button id="circuit-reload-button" + onclick="torbutton_new_circuit()" + default="true">&torbutton.circuit_display.new_circuit;</html:button> + </hbox> </vbox> - </hbox> + </vbox> <!-- Clear Site Data Button --> <vbox hidden="true"
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit f2584ebad73ada6b4b570ada7401e2d3b127a2ce Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Sep 3 03:52:23 2021 +0000 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser This reverts commit 563c8779fef936a8bb5454578765843187be396b. --- browser/modules/TorConnect.jsm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser/modules/TorConnect.jsm b/browser/modules/TorConnect.jsm index 2f947374797a..17a786dc31f0 100644 --- a/browser/modules/TorConnect.jsm +++ b/browser/modules/TorConnect.jsm @@ -472,7 +472,9 @@ const TorConnect = (() => { // will attempt to convert user-supplied string to a uri, fallback to about:tor if cannot convert // to valid uri object let uriStringToUri = (uriString) => { - let uri = Services.uriFixup.createFixupURI(uriString, 0); + const fixupFlags = Ci.nsIURIFixup.FIXUP_FLAG_NONE; + let uri = Services.uriFixup.getFixupURIInfo(uriString, fixupFlags) + .preferredURI; return uri ? uri : Services.io.newURI("about:tor"); }; let uris = uriStrings.map(uriStringToUri);
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit c1843e4e494aa810be1a605edac827c766b8809a Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Wed Sep 29 15:42:41 2021 +0000 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser --- browser/components/urlbar/UrlbarInput.jsm | 1 + 1 file changed, 1 insertion(+) diff --git a/browser/components/urlbar/UrlbarInput.jsm b/browser/components/urlbar/UrlbarInput.jsm index a118a6f76c19..bab9bf1ad2b7 100644 --- a/browser/components/urlbar/UrlbarInput.jsm +++ b/browser/components/urlbar/UrlbarInput.jsm @@ -32,6 +32,7 @@ function maybeUpdateOpenLocationForTorConnect(openUILinkWhere, currentURI, desti } catch (e) { // swallow exception and fall through returning original so we don't accidentally break // anything if an exception is thrown + console.log(e? e.message : e); } return openUILinkWhere;
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#tor
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 74591f4b96daf7ccafbd291f795e46e39036bf85 Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Sep 3 03:52:21 2021 +0000 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#tor This reverts commit 84aa0573fb072665688c669b98032c3c561ee123. --- browser/components/torpreferences/content/torPane.js | 1 - 1 file changed, 1 deletion(-) diff --git a/browser/components/torpreferences/content/torPane.js b/browser/components/torpreferences/content/torPane.js index 6dbc6b3c0e91..cde424a3f32a 100644 --- a/browser/components/torpreferences/content/torPane.js +++ b/browser/components/torpreferences/content/torPane.js @@ -699,7 +699,6 @@ const gTorPane = (function() { case TorBridgeSource.BuiltIn: { // if there is a built-in bridge already selected, use that let bridgeType = this._builtinBridgeMenulist.value; - console.log(`bridge type: ${bridgeType}`); if (bridgeType) { TorSettings.bridges.enabled = true; TorSettings.bridges.source = TorBridgeSource.BuiltIn;
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit d4b6078699c350ad6e2c1a94b985b0b170637ece Author: Richard Pospesel <richard(a)torproject.org> Date: Tue Sep 14 15:07:30 2021 -0500 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser --- .../torconnect/content/aboutTorConnect.css | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/browser/components/torconnect/content/aboutTorConnect.css b/browser/components/torconnect/content/aboutTorConnect.css index 3bdc6ff22192..e5e0d7accac2 100644 --- a/browser/components/torconnect/content/aboutTorConnect.css +++ b/browser/components/torconnect/content/aboutTorConnect.css @@ -29,21 +29,25 @@ input[type="checkbox"]:not(:disabled):hover { border-color: var(--purple-70); } -/* fix checkbox visibility when dark mode enabled */ -input[type="checkbox"]:checked { - fill: var(--in-content-page-color); +#connectButton, +input[type="checkbox"]:not(:disabled) { + background-color: var(--purple-60)!important; + color: white; + fill: white; } -#connectButton { - background-color: var(--purple-60); -} - -#connectButton:hover { - background-color: var(--purple-70); +#connectButton:hover, +input[type="checkbox"]:not(:disabled):hover { + background-color: var(--purple-70)!important; + color: white; + fill: white; } -#connectButton:active { - background-color: var(--purple-80); +#connectButton:active, +input[type="checkbox"]:not(:disabled):active { + background-color: var(--purple-80)!important; + color: white; + fill: white; } #progressBackground {
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#tor
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 49a17ed426b887a0c8cd3724d99a03333bc35231 Author: Matthew Finkel <sysrqb(a)torproject.org> Date: Fri Sep 3 03:52:19 2021 +0000 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#tor This reverts commit 48b88a65e95064d39c84650e4ee37dde7b0bda83. --- browser/modules/BridgeDB.jsm | 6 ++-- browser/modules/TorProtocolService.jsm | 58 +++++++++++++++++----------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/browser/modules/BridgeDB.jsm b/browser/modules/BridgeDB.jsm index 2caa26b4e2e0..9f76b4f05a69 100644 --- a/browser/modules/BridgeDB.jsm +++ b/browser/modules/BridgeDB.jsm @@ -26,7 +26,7 @@ var BridgeDB = { return this._bridges; }, - submitCaptchaGuess(aCaptchaSolution) { + async submitCaptchaGuess(aCaptchaSolution) { if (this._moatRequestor && this._currentCaptchaInfo) { return this._moatRequestor .finishFetch( @@ -49,11 +49,11 @@ var BridgeDB = { }); }, - requestNewCaptchaImage(aProxyURI) { + async requestNewCaptchaImage(aProxyURI) { // close and clear out existing state on captcha request this.close(); - let transportPlugins = TorProtocolService.readStringArraySetting( + let transportPlugins = await TorProtocolService.readStringArraySetting( TorStrings.configKeys.clientTransportPlugin ); diff --git a/browser/modules/TorProtocolService.jsm b/browser/modules/TorProtocolService.jsm index e6c78b9a0eb1..b8678fbca9aa 100644 --- a/browser/modules/TorProtocolService.jsm +++ b/browser/modules/TorProtocolService.jsm @@ -108,7 +108,7 @@ var TorProtocolService = { // takes a Map containing tor settings // throws on error - writeSettings(aSettingsObj) { + async writeSettings(aSettingsObj) { // only write settings that have changed let newSettings = new Map(); for (const [setting, value] of aSettingsObj) { @@ -157,7 +157,7 @@ var TorProtocolService = { } let errorObject = {}; - if (!this._TorLauncherProtocolService.TorSetConfWithReply(settingsObject, errorObject)) { + if (! await this._TorLauncherProtocolService.TorSetConfWithReply(settingsObject, errorObject)) { throw new Error(errorObject.details); } @@ -168,17 +168,17 @@ var TorProtocolService = { } }, - _readSetting(aSetting) { + async _readSetting(aSetting) { this._assertValidSettingKey(aSetting); - let reply = this._TorLauncherProtocolService.TorGetConf(aSetting); + let reply = await this._TorLauncherProtocolService.TorGetConf(aSetting); if (this._TorLauncherProtocolService.TorCommandSucceeded(reply)) { return reply.lineArray; } throw new Error(reply.lineArray.join("\n")); }, - _readBoolSetting(aSetting) { - let lineArray = this._readSetting(aSetting); + async _readBoolSetting(aSetting) { + let lineArray = await this._readSetting(aSetting); if (lineArray.length != 1) { throw new Error( `Expected an array with length 1 but received array of length ${ @@ -198,8 +198,8 @@ var TorProtocolService = { } }, - _readStringSetting(aSetting) { - let lineArray = this._readSetting(aSetting); + async _readStringSetting(aSetting) { + let lineArray = await this._readSetting(aSetting); if (lineArray.length != 1) { throw new Error( `Expected an array with length 1 but received array of length ${ @@ -210,32 +210,32 @@ var TorProtocolService = { return lineArray[0]; }, - _readStringArraySetting(aSetting) { - let lineArray = this._readSetting(aSetting); + async _readStringArraySetting(aSetting) { + let lineArray = await this._readSetting(aSetting); return lineArray; }, - readBoolSetting(aSetting) { - let value = this._readBoolSetting(aSetting); + async readBoolSetting(aSetting) { + let value = await this._readBoolSetting(aSetting); this._settingsCache.set(aSetting, value); return value; }, - readStringSetting(aSetting) { - let value = this._readStringSetting(aSetting); + async readStringSetting(aSetting) { + let value = await this._readStringSetting(aSetting); this._settingsCache.set(aSetting, value); return value; }, - readStringArraySetting(aSetting) { - let value = this._readStringArraySetting(aSetting); + async readStringArraySetting(aSetting) { + let value = await this._readStringArraySetting(aSetting); this._settingsCache.set(aSetting, value); return value; }, // writes current tor settings to disk - flushSettings() { - this.sendCommand("SAVECONF"); + async flushSettings() { + await this.sendCommand("SAVECONF"); }, getLog(countObj) { @@ -261,17 +261,17 @@ var TorProtocolService = { return true; }, - enableNetwork() { + async enableNetwork() { let settings = {}; settings.DisableNetwork = false; let errorObject = {}; - if (!this._TorLauncherProtocolService.TorSetConfWithReply(settings, errorObject)) { + if (! await this._TorLauncherProtocolService.TorSetConfWithReply(settings, errorObject)) { throw new Error(errorObject.details); } }, - sendCommand(cmd) { - return this._TorLauncherProtocolService.TorSendCommand(cmd); + async sendCommand(cmd) { + return await this._TorLauncherProtocolService.TorSendCommand(cmd); }, retrieveBootstrapStatus() { @@ -287,11 +287,11 @@ var TorProtocolService = { } }, - setConfWithReply(settings) { + async setConfWithReply(settings) { let result = false; const error = {}; try { - result = this._TorLauncherProtocolService.TorSetConfWithReply(settings, error); + result = await this._TorLauncherProtocolService.TorSetConfWithReply(settings, error); } catch (e) { console.log("TorSetConfWithReply error", e); error.details = this._GetSaveSettingsErrorMessage(e.message); @@ -312,16 +312,16 @@ var TorProtocolService = { }, // Resolves to null if ok, or an error otherwise - connect() { + async connect() { const kTorConfKeyDisableNetwork = "DisableNetwork"; const settings = {}; settings[kTorConfKeyDisableNetwork] = false; - const { result, error } = this.setConfWithReply(settings); + const { result, error } = await this.setConfWithReply(settings); if (!result) { return error; } try { - this.sendCommand("SAVECONF"); + await this.sendCommand("SAVECONF"); this.clearBootstrapError(); this.retrieveBootstrapStatus(); } catch (e) { @@ -334,14 +334,14 @@ var TorProtocolService = { return this._TorLauncherProtocolService.TorLogHasWarnOrErr; }, - torStopBootstrap() { + async torStopBootstrap() { // Tell tor to disable use of the network; this should stop the bootstrap // process. const kErrorPrefix = "Setting DisableNetwork=1 failed: "; try { let settings = {}; settings.DisableNetwork = true; - const { result, error } = this.setConfWithReply(settings); + const { result, error } = await this.setConfWithReply(settings); if (!result) { console.log( `Error stopping bootstrap ${kErrorPrefix} ${error.details}`
1 0
0 0
[tor-browser/tor-browser-91.2.0esr-11.0-1] fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser
by sysrqb@torproject.org 06 Oct '21

06 Oct '21
commit 9049bf031e938af4dfc3b09c729cacd9bcc1b11b Author: Richard Pospesel <richard(a)torproject.org> Date: Wed Sep 8 12:06:57 2021 -0500 fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser --- browser/components/torconnect/TorConnectParent.jsm | 8 +------- .../components/torconnect/content/aboutTorConnect.js | 18 ++++++++---------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/browser/components/torconnect/TorConnectParent.jsm b/browser/components/torconnect/TorConnectParent.jsm index b735d75c1a72..2fbc2a5c7c7c 100644 --- a/browser/components/torconnect/TorConnectParent.jsm +++ b/browser/components/torconnect/TorConnectParent.jsm @@ -25,7 +25,6 @@ class TorConnectParent extends JSWindowActorParent { this.state = { State: TorConnect.state, StateChanged: false, - Exit: false, ErrorMessage: TorConnect.errorMessage, ErrorDetails: TorConnect.errorDetails, BootstrapProgress: TorConnect.bootstrapProgress, @@ -65,12 +64,7 @@ class TorConnectParent extends JSWindowActorParent { break; } case TorConnectTopics.BootstrapComplete: { - // tells about:torconnect pages to close or redirect themselves - // this flag will only be set if an about:torconnect page - // reaches the Bootstrapped state, so if a user - // navigates to about:torconnect manually after bootstrap, the page - // will not auto-close on them - self.state.Exit = true; + // noop break; } case TorConnectTopics.BootstrapError: { diff --git a/browser/components/torconnect/content/aboutTorConnect.js b/browser/components/torconnect/content/aboutTorConnect.js index 4eed3cf6a5c3..b53f8b13cb80 100644 --- a/browser/components/torconnect/content/aboutTorConnect.js +++ b/browser/components/torconnect/content/aboutTorConnect.js @@ -194,16 +194,10 @@ class AboutTorConnect { this.hide(this.elements.advancedButton); this.hide(this.elements.cancelButton); - // only exit about:torconnect if TorConnectParent directs us to - if (state.Exit) { - if (this.redirect) { - // first try to forward to final destination - document.location = this.redirect; - } else { - // or else close the window - window.close(); - } - } + // redirects page to the requested redirect url, removes about:torconnect + // from the page stack, so users cannot accidentally go 'back' to the + // now unresponsive page + window.location.replace(this.redirect); } update_Disabled(state) { @@ -283,6 +277,10 @@ class AboutTorConnect { if (params.has("redirect")) { const encodedRedirect = params.get("redirect"); this.redirect = decodeURIComponent(encodedRedirect); + } else { + // if the user gets here manually or via the button in the urlbar + // then we will redirect to about:tor + this.redirect = "about:tor"; } let args = await RPMSendQuery("torconnect:get-init-args");
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 919
  • 920
  • 921
  • 922
  • 923
  • 924
  • 925
  • ...
  • 2133
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.