Skip to content

Bug 42510&42511: Fix a couple of problems with external tor daemon after the recent refactors

Merge Info

Related Issues



  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport
  • No Backport (preferred): patchset for the next major stable

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Localization: typos and other localization changes that should be also in the release branch
  • Other: please explain


  • Merge to tor-browser - !fixups to tor-browser-specific commits, new features, security backports
  • Merge to base-browser - !fixups to base-browser-specific commits, new features to be shared with mullvad-browser, and security backports
    • NOTE: if your changeset includes patches to both base-browser and tor-browser please clearly label in the change description which commits should be cherry-picked to base-browser after merging

Issue Tracking


Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • macos : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : dan, ma1, pierov, richard
    • security : ma1
    • signing : boklm, richard
    • updater : pierov
    • misc/other : pierov, richard

Change Description

For #42510 (closed), we don't call writeSettings when we don't own the tor daemon (it's more or less the same check to disable the connection panel).

While checking that, I noticed I used TorConnectState.DisabledState instead of TorConnectState.Disabled.

This was also the reason behind #42511 (closed).

How Tested

  1. With a high level of logs, checked that we don't call writeSettings when TOR_SKIP_LAUNCH=1 is defined (I started another Tor Browser instance with TOR_CONTROL_PASSWD to make sure it could connect to the other browser)
  2. Checked that the "Not connected" doesn't appear on this tree

Exact command lines:

# The Tor Browser that will own the tor daemon
TOR_CONTROL_PASSWD='"1234"' ./start-tor-browser -v -jsconsole
# The patched Tor Browser
TOR_SKIP_LAUNCH=1 TOR_CONTROL_PASSWD='"1234"' ./start-tor-browser -v -jsconsole
Edited by Pier Angelo Vendrame

Merge request reports