[tbb-commits] [tor-launcher/master] Bug 15704: Do not enable network if wizard is opened.

mikeperry at torproject.org mikeperry at torproject.org
Fri Apr 17 01:33:54 UTC 2015


commit fd61cb0e01d9dfb8904be00019d0546330a91b06
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Thu Apr 16 12:24:27 2015 -0400

    Bug 15704: Do not enable network if wizard is opened.
    
    If default bridges were configured and the network settings wizard was
    opened during a subsequent launch of Tor Browser (e.g., after a failed
    bootstrap), Tor Launcher was incorrectly setting DisableNetwork=0.
---
 src/components/tl-process.js |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index ef2b12c..9265052 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -559,12 +559,17 @@ TorProcessService.prototype =
     var errObj = {};
     var didSucceed = this.mProtocolSvc.TorSetConfWithReply(settings, errObj);
 
-    settings = {};
-    settings["DisableNetwork"] = false;
-    if (!this.mProtocolSvc.TorSetConfWithReply(settings,
-                                               (didSucceed) ? errObj : null))
+    // If the network settings wizard was not opened at startup, enable the
+    // network so that bootstrapping will proceed with the default bridges.
+    if (!TorLauncherUtil.shouldShowNetworkSettings)
     {
-      didSucceed = false;
+      settings = {};
+      settings["DisableNetwork"] = false;
+      if (!this.mProtocolSvc.TorSetConfWithReply(settings,
+                                                 (didSucceed) ? errObj : null))
+      {
+        didSucceed = false;
+      }
     }
 
     if (didSucceed)



More information about the tbb-commits mailing list