Skip to content

Better handle missing tor connection in OnionAliasStore.sys.mjs

From !1663 (comment 3251641).

Currently, OnionAliasStore.sys.mjs has some logic to delay fetching the ruleset until TorConnect reports we are bootstrapped. It also has some logic to refetch the ruleset when the preference browser.urlbar.onionRewrites.enabled is changed mid-session. However, there are two flaws to this logic:

  1. It does not handle cases where the tor daemon is external and has not connected. E.g. Tails.
  2. It does not handle the case where browser.urlbar.onionRewrites.enabled changes in value whilst we are not bootstrapped mid-session.

/cc @pierov

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information