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
  • ----- 2025 -----
  • 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
  • 18962 discussions
[builders/tor-browser-build] branch main updated: Bug 40660: Update changelog-format-blog-post script to point gitlab rather than gitolite
by gitolite role 25 Oct '22

25 Oct '22
This is an automated email from the git hooks/post-receive script. boklm pushed a commit to branch main in repository builders/tor-browser-build. The following commit(s) were added to refs/heads/main by this push: new a6c85b14 Bug 40660: Update changelog-format-blog-post script to point gitlab rather than gitolite a6c85b14 is described below commit a6c85b149af9025e6a26c17c7fcaf4c7d5e5614c Author: Richard Pospesel <richard(a)torproject.org> AuthorDate: Mon Oct 24 19:39:53 2022 +0000 Bug 40660: Update changelog-format-blog-post script to point gitlab rather than gitolite --- tools/changelog-format-blog-post | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/changelog-format-blog-post b/tools/changelog-format-blog-post index 84519bba..c9e61150 100755 --- a/tools/changelog-format-blog-post +++ b/tools/changelog-format-blog-post @@ -49,5 +49,6 @@ if (! ( $current_tbversion =~ m/a/ ) ) { my @v = split(/\./, $current_tbversion); $changelog_branch = "maint-$v[0].$v[1]"; } -print "The full changelog since [Tor Browser $last_tbversion](https://gitweb.torproject.org/builders/tor-browser-build.git/plain/projects/browser/Bundle-Data/Docs/ChangeLog.txt?h=$changelog_branch) is:\n\n"; +print "The full changelog since [Tor Browser $last_tbversion](https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/raw/$changelog_branch/projects/browser/Bundle-Data/Docs/ChangeLog.txt) is:\n\n"; + print $changelog; -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser-spec] branch main updated: Bug 40025: FF98 Audit
by gitolite role 24 Oct '22

24 Oct '22
This is an automated email from the git hooks/post-receive script. richard pushed a commit to branch main in repository tor-browser-spec. The following commit(s) were added to refs/heads/main by this push: new 9158e02 Bug 40025: FF98 Audit 9158e02 is described below commit 9158e0260674995c7471aefb03e817857a3c39fe Author: Richard Pospesel <richard(a)torproject.org> AuthorDate: Mon Oct 24 20:32:56 2022 +0000 Bug 40025: FF98 Audit --- audits/FF98_AUDIT | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/audits/FF98_AUDIT b/audits/FF98_AUDIT new file mode 100644 index 0000000..81fd0a7 --- /dev/null +++ b/audits/FF98_AUDIT @@ -0,0 +1,76 @@ +Tracking issue: https://gitlab.torproject.org/tpo/applications/tor-browser-spec/-/issues/40… + +# General + +The audit begins at the commit hash where the previous audit ended. Use code_audit.sh for creating the diff and highlighting potentially problematic code. The audit is scoped to a specific language (currently C/C++, Rust, Java/Kotlin, and Javascript). + +The output includes the entire patch where the new problematic code was introduced. Search for `XXX MATCH XXX` to find the next potential violation. + +`code_audit.sh` contains the list of known problematic APIs. New usage of these functions are documented and analyzed in this audit. + +## Firefox: https://github.com/mozilla/gecko-dev.git + +- Start: `82764d45153d175f4686ead7aac977810fe1fd1b` ( `FIREFOX_RELEASE_98_BASE` ) +- End: `99300ebd4a4a6440b6a11a80108f1ed6d867cdb4` ( `FIREFOX_RELEASE_99_BASE` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +--- + +## Application Services: https://github.com/mozilla/application-services.git + +- Start: `17942945873cdb8be56a9316d3cb8a611b3ef321` ( `v91.1.0` ) +- End: `1fcdb5984be6e0cc460d00cde44c49b7e3ac1ec6` ( `v92.0.0` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +## Android Components: https://github.com/mozilla-mobile/android-components.git + +- Start: `6f6ed0ca80410e42e8781bcf856e686ecbff2f63` ( `v98.0.0` ) +- End: `a31f2c481a7e220ca87affd8cd88fcb42b1624c1` ( `v98.0.13` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +## Fenix: https://github.com/mozilla-mobile/fenix.git + +- Start: `6c290430adc9af36e5123a78360a602bb5509c6c` ( `v98.0.0-beta.1` ) +- End: `0df2c648ab38682569e823b2140b945a0d7d6a9b` ( `releases_v98.0.0` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +## Ticket Review ## + +### 98 https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&resolution=F… + +- https://bugzilla.mozilla.org/show_bug.cgi?id=1749501 : @ma1 https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41134 + - Nothing to do here +- https://bugzilla.mozilla.org/show_bug.cgi?id=1749323 : @dan https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41135 + - Fixed in https://gitlab.torproject.org/tpo/applications/tor-browser/-/merge_requests… +- https://bugzilla.mozilla.org/show_bug.cgi?id=1749635 : @pierov https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41136 + - Nothing to do here +- https://bugzilla.mozilla.org/show_bug.cgi?id=1751170 : @pierov https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41137 + - Fixed in https://gitlab.torproject.org/tpo/applications/tor-browser/-/merge_requests… \ No newline at end of file -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser-spec] branch main updated: Bug 40024: FF96 Audit
by gitolite role 24 Oct '22

24 Oct '22
This is an automated email from the git hooks/post-receive script. richard pushed a commit to branch main in repository tor-browser-spec. The following commit(s) were added to refs/heads/main by this push: new 3287abf Bug 40024: FF96 Audit 3287abf is described below commit 3287abf6189f1ca9f3422eeb47bd04a253aa8a93 Author: Richard Pospesel <richard(a)torproject.org> AuthorDate: Mon Oct 24 20:27:55 2022 +0000 Bug 40024: FF96 Audit --- audits/FF96_AUDIT | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/audits/FF96_AUDIT b/audits/FF96_AUDIT new file mode 100644 index 0000000..d30dbfb --- /dev/null +++ b/audits/FF96_AUDIT @@ -0,0 +1,77 @@ +Tracking Issue: https://gitlab.torproject.org/tpo/applications/tor-browser-spec/-/issues/40… + +# General + +The audit begins at the commit hash where the previous audit ended. Use code_audit.sh for creating the diff and highlighting potentially problematic code. The audit is scoped to a specific language (currently C/C++, Rust, Java/Kotlin, and Javascript). + +The output includes the entire patch where the new problematic code was introduced. Search for `XXX MATCH XXX` to find the next potential violation. + +`code_audit.sh` contains the list of known problematic APIs. New usage of these functions are documented and analyzed in this audit. + +## Firefox: https://github.com/mozilla/gecko-dev.git + +- Start: `6a277ae5bdf6554793cd0da292a9c9ea804b4ed9` ( `FIREFOX_RELEASE_96_BASE` ) +- End: `e6b83e1727b7e9a6847e6e15bdb935d9937099e4` ( `FIREFOX_RELEASE_97_BASE` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +#### e88ab3dace9ad1c671c6c37a5aa1a3652e754544 +- Some windows proxy stuff we need to check +- Review Result: (SAFE|BAD) + +--- + +## Application Services: https://github.com/mozilla/application-services.git + +- Start: `5ceeb43598871a7d8550acc574a6a3fb93803ad7` ( `v87.3.0` ) +- End: `df53ad867be7d79899e05797533cd624f1eeb2a2` ( `v90.0.1` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +## Android Components: https://github.com/mozilla-mobile/android-components.git + +- Start: `ea5bd2687c9b64245ea8e3cdcb84faa5d87d540a` ( `v96.0.0` ) +- End: `0178a6fde98fa8c76885d67a2362f2ca310b67fd` ( `v96.0.15` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +**OR** +## Fenix: https://github.com/mozilla-mobile/fenix.git + +- Start: `a7afdb776ca202bf5eafc29d6a84f047c1609e0f` ( `v96.0.0-beta.1` ) +- End: `abe11c163d14fab17bdcf8aebbef2de2a3360032` ( `releases_v96.0.0` ) + +### Languages: +- [x] java +- [x] cpp +- [x] js +- [x] rust + +Nothing of interest (using `code_audit.sh`) + +**OR** + +## Ticket Review ## + +### Review List + +#### 96 https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&resolution=F… + +- https://bugzilla.mozilla.org/show_bug.cgi?id=1740840 : @ma1 https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41129 + - Nothing to do here \ No newline at end of file -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated: fixup! Bug 40562: Added Tor-related preferences to 000-tor-browser.js
by gitolite role 24 Oct '22

24 Oct '22
This is an automated email from the git hooks/post-receive script. richard pushed a commit to branch tor-browser-102.4.0esr-12.0-1 in repository tor-browser. The following commit(s) were added to refs/heads/tor-browser-102.4.0esr-12.0-1 by this push: new 7187cb8561e9 fixup! Bug 40562: Added Tor-related preferences to 000-tor-browser.js 7187cb8561e9 is described below commit 7187cb8561e9fb3287e7b12aad3a73ee6335a20c Author: Richard Pospesel <richard(a)torproject.org> AuthorDate: Mon Oct 17 21:53:38 2022 +0000 fixup! Bug 40562: Added Tor-related preferences to 000-tor-browser.js Bug 40251: Clear obsolete prefs after torbutton!27 --- browser/app/profile/000-tor-browser.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js index 1a992d9681ad..65d6bc26a8b9 100644 --- a/browser/app/profile/000-tor-browser.js +++ b/browser/app/profile/000-tor-browser.js @@ -46,20 +46,15 @@ pref("extensions.torbutton.logmethod",1); // 0=stdout, 1=errorconsole, 2=debuglo // Display prefs pref("extensions.torbutton.display_circuit", true); -pref("extensions.torbutton(a)torproject.org.description", "chrome://torbutton/locale/torbutton.properties"); -pref("extensions.torbutton.updateNeeded", false); // Tor check and proxy prefs pref("extensions.torbutton.test_enabled",true); pref("extensions.torbutton.test_url","https://check.torproject.org/?TorButton=true"); pref("extensions.torbutton.local_tor_check",true); -pref("extensions.torbutton.versioncheck_enabled",true); pref("extensions.torbutton.use_nontor_proxy",false); // State prefs: pref("extensions.torbutton.startup",false); -pref("extensions.torbutton.inserted_button",false); -pref("extensions.torbutton.inserted_security_level",false); // This is only used when letterboxing is disabled. // See #7255 for details. We display the warning three times to make sure the @@ -70,20 +65,12 @@ pref("extensions.torbutton.maximize_warnings_remaining", 3); pref("extensions.torbutton.clear_http_auth",true); pref("extensions.torbutton.close_newnym",true); pref("extensions.torbutton.resize_new_windows",false); -pref("extensions.torbutton.startup_state", 2); // 0=non-tor, 1=tor, 2=last -pref("extensions.torbutton.tor_memory_jar",false); -pref("extensions.torbutton.nontor_memory_jar",false); pref("extensions.torbutton.launch_warning",true); -// Opt out of Firefox addon pings: -// https://developer.mozilla.org/en/Addons/Working_with_AMO -pref("extensions.torbutton(a)torproject.org.getAddons.cache.enabled", false); - // Security Slider pref("extensions.torbutton.security_slider", 4); pref("extensions.torbutton.security_custom", false); -pref("extensions.torbutton.confirm_plugins", true); pref("extensions.torbutton.confirm_newnym", true); pref("extensions.torbutton.noscript_inited", false); -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated: fixup! Bug 40933: Add tor-launcher functionality
by gitolite role 24 Oct '22

24 Oct '22
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-1 in repository tor-browser. The following commit(s) were added to refs/heads/tor-browser-102.4.0esr-12.0-1 by this push: new ed7d92b0d031 fixup! Bug 40933: Add tor-launcher functionality ed7d92b0d031 is described below commit ed7d92b0d03166825f51d64cc57f59c3594b996b Author: Pier Angelo Vendrame <pierov(a)torproject.org> AuthorDate: Fri Oct 21 19:35:58 2022 +0200 fixup! Bug 40933: Add tor-launcher functionality Bug 41386: Fix a pair of errors when handling the case of tor already running --- .../components/tor-launcher/TorMonitorService.jsm | 107 +++++++++++++++------ toolkit/components/tor-launcher/TorProcess.jsm | 22 ++--- 2 files changed, 88 insertions(+), 41 deletions(-) diff --git a/toolkit/components/tor-launcher/TorMonitorService.jsm b/toolkit/components/tor-launcher/TorMonitorService.jsm index 881f4a5a7355..27572c30370f 100644 --- a/toolkit/components/tor-launcher/TorMonitorService.jsm +++ b/toolkit/components/tor-launcher/TorMonitorService.jsm @@ -5,7 +5,9 @@ var EXPORTED_SYMBOLS = ["TorMonitorService"]; const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); -const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm"); +const { clearTimeout, setTimeout } = ChromeUtils.import( + "resource://gre/modules/Timer.jsm" +); const { XPCOMUtils } = ChromeUtils.import( "resource://gre/modules/XPCOMUtils.jsm" ); @@ -13,7 +15,7 @@ const { XPCOMUtils } = ChromeUtils.import( const { TorParsers, TorStatuses } = ChromeUtils.import( "resource://gre/modules/TorParsers.jsm" ); -const { TorProcess, TorProcessStatus } = ChromeUtils.import( +const { TorProcess } = ChromeUtils.import( "resource://gre/modules/TorProcess.jsm" ); @@ -69,6 +71,7 @@ const TorMonitorService = { _connection: null, _eventsToMonitor: Object.freeze(["STATUS_CLIENT", "NOTICE", "WARN", "ERR"]), _torLog: [], // Array of objects with date, type, and msg properties. + _startTimeout: null, _isBootstrapDone: false, _bootstrapErrorOccurred: false, @@ -91,7 +94,7 @@ const TorMonitorService = { this._controlTor(); } else { logger.info( - "Not starting the event monitor, as e do not own the Tor daemon." + "Not starting the event monitor, as we do not own the Tor daemon." ); } logger.debug("TorMonitorService initialized"); @@ -104,6 +107,8 @@ const TorMonitorService = { uninit() { if (this._torProcess) { this._torProcess.forget(); + this._torProcess.onExit = null; + this._torProcess.onRestart = null; this._torProcess = null; } this._shutDownEventMonitor(); @@ -181,35 +186,42 @@ const TorMonitorService = { // Private methods async _startProcess() { - this._torProcess = new TorProcess(); - this._torProcess.onExit = () => { - Services.obs.notifyObservers(null, TorTopics.ProcessExited); - }; - this._torProcess.onRestart = async () => { - this._shutDownEventMonitor(); - await this._controlTor(); - Services.obs.notifyObservers(null, TorTopics.ProcessRestarted); - }; + // TorProcess should be instanced once, then always reused and restarted + // only through the prompt it exposes when the controlled process dies. + if (!this._torProcess) { + this._torProcess = new TorProcess(); + this._torProcess.onExit = () => { + this._shutDownEventMonitor(); + Services.obs.notifyObservers(null, TorTopics.ProcessExited); + }; + this._torProcess.onRestart = async () => { + this._shutDownEventMonitor(); + await this._controlTor(); + Services.obs.notifyObservers(null, TorTopics.ProcessRestarted); + }; + } + + // Already running, but we did not start it + if (this._torProcess.isRunning) { + return false; + } + try { await this._torProcess.start(); - if (!this._torProcess.isRunning) { - this._torProcess = null; - return false; + if (this._torProcess.isRunning) { + logger.info("tor started"); } } catch (e) { // TorProcess already logs the error. this._bootstrapErrorOccurred = true; this._lastWarningPhase = "startup"; this._lastWarningReason = e.toString(); - this._torProcess = null; - return false; } - logger.info("tor started"); - return true; + return this._torProcess.isRunning; }, async _controlTor() { - if (!this._torProcess && !(await this._startProcess())) { + if (!this._torProcess?.isRunning && !(await this._startProcess())) { logger.error("Tor not running, not starting to monitor it."); return; } @@ -217,7 +229,6 @@ const TorMonitorService = { let delayMS = ControlConnTimings.initialDelayMS; const callback = async () => { if (await this._startEventMonitor()) { - this._status = TorProcessStatus.Running; this.retrieveBootstrapStatus().catch(e => { logger.warn("Could not get the initial bootstrap status", e); }); @@ -225,6 +236,14 @@ const TorMonitorService = { // FIXME: TorProcess is misleading here. We should use a topic related // to having a control port connection, instead. Services.obs.notifyObservers(null, TorTopics.ProcessIsReady); + + // We reset this here hoping that _shutDownEventMonitor can interrupt + // the current monitor, either by calling clearTimeout and preventing it + // from starting, or by closing the control port connection. + if (this._startTimeout === null) { + logger.warn("Someone else reset _startTimeout!"); + } + this._startTimeout = null; } else if ( Date.now() - this._torProcessStartTime > ControlConnTimings.timeoutMS @@ -234,18 +253,28 @@ const TorMonitorService = { this._lastWarningPhase = "startup"; this._lastWarningReason = s; logger.info(s); + if (this._startTimeout === null) { + logger.warn("Someone else reset _startTimeout!"); + } + this._startTimeout = null; } else { delayMS *= 2; if (delayMS > ControlConnTimings.maxRetryMS) { delayMS = ControlConnTimings.maxRetryMS; } - setTimeout(() => { + this._startTimeout = setTimeout(() => { logger.debug(`Control port not ready, waiting ${delayMS / 1000}s.`); callback(); }, delayMS); } }; - setTimeout(callback, delayMS); + // Check again, in the unfortunate case in which the execution was alrady + // queued, but was waiting network code. + if (this._startTimeout === null) { + this._startTimeout = setTimeout(callback, delayMS); + } else { + logger.error("Possible race? Refusing to start the timeout again"); + } }, async _startEventMonitor() { @@ -259,6 +288,16 @@ const TorMonitorService = { conn = await controller(avoidCache); } catch (e) { logger.error("Cannot open a control port connection", e); + if (conn) { + try { + conn.close(); + } catch (e) { + logger.error( + "Also, the connection is not null but cannot be closed", + e + ); + } + } return false; } @@ -273,12 +312,19 @@ const TorMonitorService = { return false; } + // FIXME: At the moment it is not possible to start the event monitor + // when we do start the tor process. So, does it make sense to keep this + // control? if (this._torProcess) { this._torProcess.connectionWorked(); } if (!TorLauncherUtil.shouldOnlyConfigureTor) { - this._takeTorOwnership(conn); + try { + await this._takeTorOwnership(conn); + } catch (e) { + logger.warn("Could not take ownership of the Tor daemon", e); + } } this._connection = conn; @@ -449,12 +495,13 @@ const TorMonitorService = { }, _shutDownEventMonitor() { - if (this._connection) { - this._connection.close(); - this._connection = null; - this._eventMonitorInProgressReply = null; - this._isBootstrapDone = false; - this.clearBootstrapError(); + this._connection?.close(); + this._connection = null; + if (this._startTimeout !== null) { + clearTimeout(this._startTimeout); + this._startTimeout = null; } + this._isBootstrapDone = false; + this.clearBootstrapError(); }, }; diff --git a/toolkit/components/tor-launcher/TorProcess.jsm b/toolkit/components/tor-launcher/TorProcess.jsm index 3dd194817d0a..a8ad7b73c95e 100644 --- a/toolkit/components/tor-launcher/TorProcess.jsm +++ b/toolkit/components/tor-launcher/TorProcess.jsm @@ -1,6 +1,6 @@ "use strict"; -var EXPORTED_SYMBOLS = ["TorProcess", "TorProcessStatus"]; +var EXPORTED_SYMBOLS = ["TorProcess"]; const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm"); @@ -49,7 +49,7 @@ class TorProcess { _exeFile = null; _dataDir = null; _args = []; - _torProcess = null; // nsIProcess + _subprocess = null; _status = TorProcessStatus.Unknown; _torProcessStartTime = null; // JS Date.now() _didConnectToTorControlPort = false; // Have we ever made a connection? @@ -69,7 +69,7 @@ class TorProcess { } async start() { - if (this._torProcess) { + if (this._subprocess) { return; } @@ -135,13 +135,13 @@ class TorProcess { environmentAppend: true, stderr: "pipe", }; - this._torProcess = await Subprocess.call(options); + this._subprocess = await Subprocess.call(options); this._watchProcess(); this._status = TorProcessStatus.Running; this._torProcessStartTime = Date.now(); } catch (e) { this._status = TorProcessStatus.Exited; - this._torProcess = null; + this._subprocess = null; logger.error("startTor error:", e); throw e; } @@ -162,7 +162,7 @@ class TorProcess { // Still, before closing the owning connection, this class should forget about // the process, so that future notifications will be ignored. forget() { - this._torProcess = null; + this._subprocess = null; this._status = TorProcessStatus.Exited; } @@ -174,14 +174,14 @@ class TorProcess { } async _watchProcess() { - const watched = this._torProcess; + const watched = this._subprocess; if (!watched) { return; } try { const { exitCode } = await watched.wait(); - if (watched !== this._torProcess) { + if (watched !== this._subprocess) { logger.debug(`A Tor process exited with code ${exitCode}.`); } else if (exitCode) { logger.warn(`The watched Tor process exited with code ${exitCode}.`); @@ -192,13 +192,13 @@ class TorProcess { logger.error("Failed to watch the tor process", e); } - if (watched === this._torProcess) { + if (watched === this._subprocess) { this._processExitedUnexpectedly(); } } _processExitedUnexpectedly() { - this._torProcess = null; + this._subprocess = null; this._status = TorProcessStatus.Exited; // TODO: Move this logic somewhere else? @@ -238,7 +238,7 @@ class TorProcess { } }); } else if (this.onExit) { - this.onExit(unexpected); + this.onExit(); } } -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated: fixup! Bug 40597: Implement TorSettings module
by gitolite role 24 Oct '22

24 Oct '22
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-1 in repository tor-browser. The following commit(s) were added to refs/heads/tor-browser-102.4.0esr-12.0-1 by this push: new 3d5f52ebdda4 fixup! Bug 40597: Implement TorSettings module 3d5f52ebdda4 is described below commit 3d5f52ebdda4026d4891cc8a1079e8370c0ed5e5 Author: Pier Angelo Vendrame <pierov(a)torproject.org> AuthorDate: Fri Oct 21 19:13:09 2022 +0200 fixup! Bug 40597: Implement TorSettings module Bug 41281: Opt-out Connection Assist traffic --- browser/modules/TorConnect.jsm | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/browser/modules/TorConnect.jsm b/browser/modules/TorConnect.jsm index 34a3a9ee7d33..7c458a41c17d 100644 --- a/browser/modules/TorConnect.jsm +++ b/browser/modules/TorConnect.jsm @@ -23,9 +23,6 @@ const { TorMonitorService } = ChromeUtils.import( const { TorBootstrapRequest } = ChromeUtils.import( "resource://gre/modules/TorBootstrapRequest.jsm" ); -const { TorLauncherUtil } = ChromeUtils.import( - "resource://gre/modules/TorLauncherUtil.jsm" -); const { TorSettings, @@ -49,6 +46,7 @@ const TorLauncherPrefs = Object.freeze({ const TorConnectPrefs = Object.freeze({ censorship_level: "torbrowser.debug.censorship_level", + allow_internet_test: "torbrowser.bootstrap.allow_internet_test", }); const TorConnectState = Object.freeze({ @@ -251,30 +249,41 @@ const InternetStatus = Object.freeze({ class InternetTest { constructor() { + this._enabled = Services.prefs.getBoolPref( + TorConnectPrefs.allow_internet_test, + true + ); + this._status = InternetStatus.Unknown; this._error = null; this._pending = false; - this._timeout = setTimeout(() => { - this._timeout = null; - this.test(); - }, this.timeoutRand()); + if (this._enabled) { + this._timeout = setTimeout(() => { + this._timeout = null; + this.test(); + }, this.timeoutRand()); + } this.onResult = (online, date) => {}; this.onError = err => {}; } test() { - if (this._pending) { + if (this._pending || !this._enabled) { return; } this.cancel(); this._pending = true; + console.log("TorConnect: starting the Internet test"); this._testAsync() .then(status => { this._pending = false; this._status = status.successful ? InternetStatus.Online : InternetStatus.Offline; + console.log( + `TorConnect: performed Internet test, outcome ${this._status}` + ); this.onResult(this.status, status.date); }) .catch(error => { @@ -322,6 +331,10 @@ class InternetTest { return this._error; } + get enabled() { + return this._enabled; + } + // We randomize the Internet test timeout to make fingerprinting it harder, at least a little bit... timeoutRand() { const offset = 30000; @@ -457,7 +470,8 @@ const TorConnect = (() => { const maybeTransitionToError = () => { if ( internetTest.status === InternetStatus.Unknown && - internetTest.error === null + internetTest.error === null && + internetTest.enabled ) { // We have been called by a failed bootstrap, but the internet test has not run yet - force // it to run immediately! -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated: fixup! Bug 40933: Add tor-launcher functionality
by gitolite role 24 Oct '22

24 Oct '22
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-1 in repository tor-browser. The following commit(s) were added to refs/heads/tor-browser-102.4.0esr-12.0-1 by this push: new 8f318354ad30 fixup! Bug 40933: Add tor-launcher functionality 8f318354ad30 is described below commit 8f318354ad30d4e56eee5aea4dc0e568dd59916b Author: Pier Angelo Vendrame <pierov(a)torproject.org> AuthorDate: Mon Oct 24 11:09:57 2022 +0200 fixup! Bug 40933: Add tor-launcher functionality Bug 41385: BootstrapError is never notified Also, cleaned TorProcessDidNotStart, that is never actually used and some other possible improvements on error reporting. --- .../tor-launcher/TorBootstrapRequest.jsm | 56 +++++++++++----------- .../components/tor-launcher/TorMonitorService.jsm | 31 ++++++++---- toolkit/components/tor-launcher/TorProcess.jsm | 23 ++------- 3 files changed, 51 insertions(+), 59 deletions(-) diff --git a/toolkit/components/tor-launcher/TorBootstrapRequest.jsm b/toolkit/components/tor-launcher/TorBootstrapRequest.jsm index 4f0ae240b31d..e999d5c3f62c 100644 --- a/toolkit/components/tor-launcher/TorBootstrapRequest.jsm +++ b/toolkit/components/tor-launcher/TorBootstrapRequest.jsm @@ -39,7 +39,7 @@ class TorBootstrapRequest { this._timeoutID = null; } - async observe(subject, topic, data) { + observe(subject, topic, data) { const obj = subject?.wrappedJSObject; switch (topic) { case TorTopics.BootstrapStatus: { @@ -59,17 +59,8 @@ class TorBootstrapRequest { break; } case TorTopics.BootstrapError: { - // first stop our bootstrap timeout before handling the error - clearTimeout(this._timeoutID); - - await TorProtocolService.stopBootstrap(); - - const message = obj.message; - const details = obj.details; - if (this.onbootstraperror) { - this.onbootstraperror(message, details); - } - this._bootstrapPromiseResolve(false); + console.info("TorBootstrapRequest: observerd TorBootstrapError", obj); + this._stop(obj?.message, obj?.details); break; } } @@ -91,41 +82,48 @@ class TorBootstrapRequest { // optionally cancel bootstrap after a given timeout if (this.timeout > 0) { this._timeoutID = setTimeout(async () => { - await TorProtocolService.stopBootstrap(); - if (this.onbootstraperror) { - this.onbootstraperror( - "Tor Bootstrap process timed out", - `Bootstrap attempt abandoned after waiting ${this.timeout} ms` - ); - } - this._bootstrapPromiseResolve(false); + this._timeoutID = null; + // TODO: Translate, if really used + await this._stop( + "Tor Bootstrap process timed out", + `Bootstrap attempt abandoned after waiting ${this.timeout} ms` + ); }, this.timeout); } // wait for bootstrapping to begin and maybe handle error - TorProtocolService.connect().catch(async err => { - clearTimeout(this._timeoutID); - // stopBootstrap never throws, at the moment - await TorProtocolService.stopBootstrap(); - if (this.onbootstraperror) { - this.onbootstraperror(err.message, ""); - } - this._bootstrapPromiseResolve(false); + TorProtocolService.connect().catch(err => { + this._stop(err.message, ""); }); }).finally(() => { // and remove ourselves once bootstrap is resolved Services.obs.removeObserver(this, TorTopics.BootstrapStatus); Services.obs.removeObserver(this, TorTopics.BootstrapError); + this._bootstrapPromise = null; }); return this._bootstrapPromise; } async cancel() { - clearTimeout(this._timeoutID); + await this._stop(); + } + + // Internal implementation. Do not use directly, but call cancel, instead. + async _stop(message, details) { + // first stop our bootstrap timeout before handling the error + if (this._timeoutID !== null) { + clearTimeout(this._timeoutID); + this._timeoutID = null; + } + // stopBootstrap never throws await TorProtocolService.stopBootstrap(); + if (this.onbootstraperror && message) { + this.onbootstraperror(message, details); + } + this._bootstrapPromiseResolve(false); } } diff --git a/toolkit/components/tor-launcher/TorMonitorService.jsm b/toolkit/components/tor-launcher/TorMonitorService.jsm index 201ac6275c56..881f4a5a7355 100644 --- a/toolkit/components/tor-launcher/TorMonitorService.jsm +++ b/toolkit/components/tor-launcher/TorMonitorService.jsm @@ -47,7 +47,6 @@ const Preferences = Object.freeze({ const TorTopics = Object.freeze({ BootstrapError: "TorBootstrapError", HasWarnOrErr: "TorLogHasWarnOrErr", - ProcessDidNotStart: "TorProcessDidNotStart", ProcessExited: "TorProcessExited", ProcessIsReady: "TorProcessIsReady", ProcessRestarted: "TorProcessRestarted", @@ -191,8 +190,17 @@ const TorMonitorService = { await this._controlTor(); Services.obs.notifyObservers(null, TorTopics.ProcessRestarted); }; - await this._torProcess.start(); - if (!this._torProcess.isRunning) { + try { + await this._torProcess.start(); + if (!this._torProcess.isRunning) { + this._torProcess = null; + return false; + } + } catch (e) { + // TorProcess already logs the error. + this._bootstrapErrorOccurred = true; + this._lastWarningPhase = "startup"; + this._lastWarningReason = e.toString(); this._torProcess = null; return false; } @@ -222,11 +230,9 @@ const TorMonitorService = { ControlConnTimings.timeoutMS ) { let s = TorLauncherUtil.getLocalizedString("tor_controlconn_failed"); - TorLauncherUtil.notifyUserOfError( - s, - null, - TorTopics.ProcessDidNotStart - ); + this._bootstrapErrorOccurred = true; + this._lastWarningPhase = "startup"; + this._lastWarningReason = s; logger.info(s); } else { delayMS *= 2; @@ -432,8 +438,13 @@ const TorMonitorService = { this._lastWarningPhase = statusObj.TAG; this._lastWarningReason = statusObj.REASON; - const msg = TorLauncherUtil.getLocalizedString("tor_bootstrap_failed"); - TorLauncherUtil.notifyUserOfError(msg, details, TorTopics.BootstrapError); + const message = TorLauncherUtil.getLocalizedString( + "tor_bootstrap_failed" + ); + Services.obs.notifyObservers( + { message, details }, + TorTopics.BootstrapError + ); } }, diff --git a/toolkit/components/tor-launcher/TorProcess.jsm b/toolkit/components/tor-launcher/TorProcess.jsm index a23fd324efff..3dd194817d0a 100644 --- a/toolkit/components/tor-launcher/TorProcess.jsm +++ b/toolkit/components/tor-launcher/TorProcess.jsm @@ -32,10 +32,6 @@ const TorProcessStatus = Object.freeze({ Exited: 3, }); -const TorProcessTopics = Object.freeze({ - ProcessDidNotStart: "TorProcessDidNotStart", -}); - // Logger adapted from CustomizableUI.jsm XPCOMUtils.defineLazyGetter(this, "logger", () => { const { ConsoleAPI } = ChromeUtils.import( @@ -82,9 +78,7 @@ class TorProcess { this._status = TorProcessStatus.Unknown; try { - if (!this._makeArgs()) { - return; - } + this._makeArgs(); this._addControlPortArg(); this._addSocksPortArg(); @@ -149,11 +143,7 @@ class TorProcess { this._status = TorProcessStatus.Exited; this._torProcess = null; logger.error("startTor error:", e); - Services.obs.notifyObservers( - null, - TorProcessTopics.ProcessDidNotStart, - null - ); + throw e; } } @@ -284,12 +274,7 @@ class TorProcess { [details], 1 ); - TorLauncherUtil.notifyUserOfError( - err, - null, - TorProcessTopics.ProcessDidNotStart - ); - return false; + throw new Error(err); } const torrcDefaultsFile = TorLauncherUtil.getTorFile( @@ -319,8 +304,6 @@ class TorProcess { this._args.push(geoip6File.path); this._args.push("HashedControlPassword"); this._args.push(hashedPassword); - - return true; } _addControlPortArg() { -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated (346318329d47 -> be9556482bb6)
by gitolite role 24 Oct '22

24 Oct '22
This is an automated email from the git hooks/post-receive script. pierov pushed a change to branch tor-browser-102.4.0esr-12.0-1 in repository tor-browser. from 346318329d47 fixup! Bug 23247: Communicating security expectations for .onion new ef0a8b21de0d fixup! Bug 40926: Implemented the New Identity feature new be9556482bb6 fixup! Bug 10760: Integrate TorButton to TorBrowser core The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: browser/base/content/appmenu-viewcache.inc.xhtml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 2
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated (405e13dc38e9 -> 346318329d47)
by gitolite role 24 Oct '22

24 Oct '22
This is an automated email from the git hooks/post-receive script. pierov pushed a change to branch tor-browser-102.4.0esr-12.0-1 in repository tor-browser. from 405e13dc38e9 fixup! Firefox preference overrides. new 1aa01860f5eb fixup! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing new 346318329d47 fixup! Bug 23247: Communicating security expectations for .onion The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 2
0 0
[tor-browser] branch tor-browser-102.4.0esr-12.0-1 updated: fixup! Firefox preference overrides.
by gitolite role 21 Oct '22

21 Oct '22
This is an automated email from the git hooks/post-receive script. richard pushed a commit to branch tor-browser-102.4.0esr-12.0-1 in repository tor-browser. The following commit(s) were added to refs/heads/tor-browser-102.4.0esr-12.0-1 by this push: new 405e13dc38e9 fixup! Firefox preference overrides. 405e13dc38e9 is described below commit 405e13dc38e9802e172a34a35c1ed47f86ec0d87 Author: Pier Angelo Vendrame <pierov(a)torproject.org> AuthorDate: Fri Oct 21 09:59:24 2022 +0200 fixup! Firefox preference overrides. Bug 41377: Hide `Search for more languages...` from Language selector in multi-locale build --- browser/app/profile/001-base-profile.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/app/profile/001-base-profile.js b/browser/app/profile/001-base-profile.js index 7d88f8fb8d0b..4197b1019454 100644 --- a/browser/app/profile/001-base-profile.js +++ b/browser/app/profile/001-base-profile.js @@ -332,6 +332,10 @@ pref("extensions.htmlaboutaddons.recommendations.enabled", false); pref("extensions.webextensions.restrictedDomains", ""); // Don't give Mozilla-recommended third-party extensions special privileges. pref("extensions.postDownloadThirdPartyPrompt", false); +// We are already providing the languages we support in multi-lingual packages. +// Therefore, do not allow download of additional language packs. They are not a +// privacy/security threat, we are disabling them for UX reasons. See bug 41377. +pref("intl.multilingual.downloadEnabled", false); // Toolbar layout pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"PersonalToolbar\":[\"personal-bookmarks\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"security-level-button\",\"new-identity-button\",\"downloads-button\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"PanelUI-contents\":[\"home-button\",\"edit-controls\",\"zoom-controls\",\"n [...] -- To stop receiving notification emails like this one, please contact the administrator of this repository.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • ...
  • 1897
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.