Opened 3 years ago

Closed 2 years ago

#20105 closed defect (fixed)

Selecting Open With TorBrowser on a Mac Opens the File in Default Browser Instead

Reported by: hdub Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords:
Cc: mcs, brade Actual Points:
Parent ID: #17670 Points:
Reviewer: Sponsor:

Description

On Mac OS X 10.11.6 , attempting to open a local HTML file using the "Open with" -> TorBrowser.app context menu option results in the file being opened in the default browser instead of TorBrowser. A new TorBrowser window is initialized but the file isn't opened in TorBrowser.

Child Tickets

Change History (11)

comment:1 Changed 3 years ago by cypherpunks

Component: Applications/Tor BrowserApplications/Tor Launcher
Owner: changed from tbb-team to brade
Summary: Selecting Open With TorBrowser in Mac OS X Finder Opens File in Default Browser InsteadSelecting Open With TorBrowser on a Mac Opens the File in Default Browser Instead

comment:2 Changed 3 years ago by teor

This is a Tor Browser bug, and a Tor Launcher bug.

And the exact behaviour also depends on:

  • if Firefox is installed or not,
    • if installed, which of Tor Browser or Firefox is registered under the Firefox 'Bundle creator OS Type code' MOZB (#17670),
  • if Tor Browser is already open or not (that is, whether Tor Launcher or Tor Browser handles the open document request), and
  • if Tor Browser or Firefox or some other browser is the default system browser.

We can focus on the Tor Launcher bug in this ticket: Tor Launcher should handle the Open Document request, and pass it on to Tor Browser once it finishes launching. If it doesn't handle the Open, macOS will try to open it in the default browser instead.

Last edited 3 years ago by teor (previous) (diff)

comment:3 Changed 3 years ago by mcs

Cc: mcs added

comment:4 in reply to:  2 ; Changed 3 years ago by cypherpunks

Replying to teor:

This is a Tor Browser bug, and a Tor Launcher bug.

And the exact behaviour also depends on:

  • if Firefox is installed or not,
    • if installed, which of Tor Browser or Firefox is registered under the Firefox 'Bundle creator OS Type code' MOZB (#17670),
  • if Tor Browser is already open or not (that is, whether Tor Launcher or Tor Browser handles the open document request), and
  • if Tor Browser or Firefox or some other browser is the default system browser.

We can focus on the Tor Launcher bug in this ticket: Tor Launcher should handle the Open Document request, and pass it on to Tor Browser once it finishes launching. If it doesn't handle the Open, macOS will try to open it in the default browser instead.

This issue is not just with Firefox as the default browser. Try it with Chrome as the default browser; it will open a Tor Browser instance if there isn't already one running, but the file is opened in Chrome.

comment:5 in reply to:  4 Changed 3 years ago by teor

Replying to cypherpunks:

Replying to teor:

This is a Tor Browser bug, and a Tor Launcher bug.

And the exact behaviour also depends on:

  • if Firefox is installed or not,
    • if installed, which of Tor Browser or Firefox is registered under the Firefox 'Bundle creator OS Type code' MOZB (#17670),
  • if Tor Browser is already open or not (that is, whether Tor Launcher or Tor Browser handles the open document request), and
  • if Tor Browser or Firefox or some other browser is the default system browser.

We can focus on the Tor Launcher bug in this ticket: Tor Launcher should handle the Open Document request, and pass it on to Tor Browser once it finishes launching. If it doesn't handle the Open, macOS will try to open it in the default browser instead.

This issue is not just with Firefox as the default browser. Try it with Chrome as the default browser; it will open a Tor Browser instance if there isn't already one running, but the file is opened in Chrome.

Yes, as I said, this issue happens when the default browser is some other browser than Firefox or Tor Browser.

But the exact behaviour depends on whether Firefox is installed, because macOS confuses Firefox with Tor Browser in some circumstances.

comment:6 Changed 3 years ago by brade

Cc: brade added
Component: Applications/Tor LauncherApplications/Tor Browser
Owner: changed from brade to tbb-team

comment:7 Changed 3 years ago by teor

Parent ID: #17670

Let's put these all under the top-level task

comment:8 Changed 2 years ago by cypherpunks

This behaviour appears to be fixed in 7.0.1 on macOS 10.12.5, but it now also opens a second TorBrowser window when you open a local file in TorBrowser.

comment:9 in reply to:  8 ; Changed 2 years ago by mcs

Replying to cypherpunks:

This behaviour appears to be fixed in 7.0.1 on macOS 10.12.5, but it now also opens a second TorBrowser window when you open a local file in TorBrowser.

What is happening in this case is that the first window (the one that contains the "Open With" file) is opened before Tor Launcher has finished setting up the Tor network connection. Tor Launcher tries to block startup of the browser until bootstrapping completes, but another part of the browser handles the open request anyway.

The right fix is probably to do what teor said at the end of comment:2. Unfortunately, it may be a lot of work to modify the Firefox code that Tor Browser is based on to queue open file requests rather than processing them right away.

comment:10 in reply to:  9 ; Changed 2 years ago by teor

Replying to mcs:

Replying to cypherpunks:

This behaviour appears to be fixed in 7.0.1 on macOS 10.12.5, but it now also opens a second TorBrowser window when you open a local file in TorBrowser.

What is happening in this case is that the first window (the one that contains the "Open With" file) is opened before Tor Launcher has finished setting up the Tor network connection. Tor Launcher tries to block startup of the browser until bootstrapping completes, but another part of the browser handles the open request anyway.

The right fix is probably to do what teor said at the end of comment:2. Unfortunately, it may be a lot of work to modify the Firefox code that Tor Browser is based on to queue open file requests rather than processing them right away.

I think an extra window is something we can live with: it's not a security issue any more, because opening links and documents with Tor Browser as the default browser works in 7.0.1.

Do you want to close this ticket, mcs?

comment:11 in reply to:  10 Changed 2 years ago by mcs

Resolution: fixed
Status: newclosed

Replying to teor:

I think an extra window is something we can live with: it's not a security issue any more, because opening links and documents with Tor Browser as the default browser works in 7.0.1.

Do you want to close this ticket, mcs?

Yes, and done.

Note: See TracTickets for help on using tickets.