Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privacy state of externally opened tabs depends on currently selected tab #42

Closed
ssokolow opened this issue Apr 24, 2013 · 4 comments
Closed

Comments

@ssokolow
Copy link

If I click a link in Thunderbird or run firefox something.html in my terminal, whether or not it's private depends on which tab is currently selected.

Given that, with a separate private window, externally-opened tabs always appear on the non-private window, it seems more intuitive that the same behaviour be preserved by Private Tab. (Especially since, if it happens unexpectedly, it could leak information by unintentionally granting an arbitrary site access to the cookie store for the private tabs.)

Edit: Looks like this problem used to occur in Firefox without extensions and Private Tab just broke the fix they made for it: https://bugzilla.mozilla.org/show_bug.cgi?id=829180

@Infocatcher
Copy link
Owner

It makes sense.
Especially considering fix for browser itself.

This is
resource:///components/nsBrowserContentHandler.js
handURIToExistingBrowser() (thanks for link to Firefox patch)
=>
chrome://browser/content/browser.js

    window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow =
      new nsBrowserAccess();

=>
nsBrowserAccess.prototype.openURI()

And there is 3 variants for browser.link.open_newwindow.override.external preference:

Ci.nsIBrowserDOMWindow.OPEN_CURRENTWINDOW // 1
Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW // 2
Ci.nsIBrowserDOMWindow.OPEN_NEWTAB // 3

[Added 2013-08-24] See browser.link.open_external preference for SeaMonkey.

But only OPEN_NEWWINDOW and OPEN_NEWTAB may be detected without additional patches for built-in functions.

@ssokolow
Copy link
Author

Ugh. I recognize that preference and I do have it set to OPEN_CURRENTWINDOW.

Heck, the only difference between what I've cobbled together and "single window mode" as implemented by various extensions is that I can still force a new window if I want.

Infocatcher added a commit that referenced this issue Apr 25, 2013
Infocatcher added a commit that referenced this issue Apr 25, 2013
Infocatcher added a commit that referenced this issue Apr 25, 2013
Infocatcher added a commit that referenced this issue Apr 25, 2013
@Infocatcher
Copy link
Owner

Looks fixed, but not fully tested.
Test version: private_tab-0.1.2pre1-fx-sm.xpi (source).

Infocatcher added a commit that referenced this issue Apr 26, 2013
@Infocatcher
Copy link
Owner

Looks fixed, but not fully tested.

Works fine for me, closed.

Infocatcher added a commit that referenced this issue May 1, 2013
Infocatcher added a commit that referenced this issue May 1, 2013
(enhancement for #42, also related to #46: NoScript wraps the same function after some delay and don't cleanup link to our wrapper)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants