commit 7530db5bb8ba90c3c895fbc166e8aba9f984868c
Merge: 068306e 975c534
Author: David Fifield <[email protected]>
Date:   Thu Mar 7 15:54:11 2019 -0700

    Merge branch 'master' into webextension

 meek-client-torbrowser/meek-client-torbrowser.go | 84 ++++++++++++----------
 meek-client-torbrowser/protocol_test.go          | 89 ++++++++++++++++++++++++
 2 files changed, 138 insertions(+), 35 deletions(-)

diff --cc meek-client-torbrowser/meek-client-torbrowser.go
index 48b055c,16f0ebc..37dcf6e
--- a/meek-client-torbrowser/meek-client-torbrowser.go
+++ b/meek-client-torbrowser/meek-client-torbrowser.go
@@@ -203,6 -203,30 +203,30 @@@ func isBrowserProfileUpToDate(templateP
  // the path to the Firefox profile to use. Otherwise, the profile is chosen 
in a
  // platform-specific way (see linux.go, mac.go, windows.go).
  func runFirefox() (cmd *exec.Cmd, stdout io.Reader, err error) {
+       // Unset environment variables that Firefox sets after a restart (as
+       // caused by, for example, an update or the installation of an add-on).
 -      // XRE_PROFILE_PATH, in particular, overrides the -profile option that
++      // XRE_PROFILE_PATH, in particular, overrides the --profile option that
+       // runFirefox sets, causing Firefox to run with profile.default instead
+       // of profile.meek-http-helper, which conflicts with the profile.default
+       // that is already running. See https://bugs.torproject.org/13247,
+       // particularly #comment:17 and #comment:18. The environment variable
+       // names come from
+       // 
https://hg.mozilla.org/mozilla-central/file/cfde3603b020/toolkit/xre/nsAppRunner.cpp#l3941
+       for _, varname := range []string{
+               "XRE_PROFILE_PATH",
+               "XRE_PROFILE_LOCAL_PATH",
+               "XRE_PROFILE_NAME",
+               "XRE_START_OFFLINE",
+               "NO_EM_RESTART",
+               "XUL_APP_FILE",
+               "XRE_BINARY_PATH",
+       } {
+               err = os.Unsetenv(varname)
+               if err != nil {
+                       return
+               }
+       }
+ 
        // Mac OS X needs absolute paths for firefox and for the profile.
        var absFirefoxPath string
        absFirefoxPath, err = filepath.Abs(firefoxPath)



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to