Temporary-containers: Make isolation trigger before Multi-Account Containers' "Always open in" option

Created on 21 Mar 2019  Â·  10Comments  Â·  Source: stoically/temporary-containers

Use Case

Typically, I make permanent containers for sites I frequently log in to and would like to keep session cookies for convenience. Using the Multi-Account Containers (MAC) addon, I set that site to "Always open in" its container, but do NOT "Remember my decision for this site". I also use Temporary Containers' MAC isolation (and TLD isolation for new tabs). This allows my workflow:

  • Start browsing in a temporary container
  • Follow a link to a site I frequent
  • Decide whether I want to open in the container (logged in) or stay in a temp container
  • When following a link off out of a permanent container, return to using temporary containers.

There's an edge case that breaks this workflow (specifically, the step in bold).

Steps to reproduce

This is easier to explain using specifics instead of generalities, so let's say I have two containers, GitHub and GitLab. github.com and gitlab.com are set to "Always open in" their respective containers.

  1. Open gitlab.com in the Gitlab container.
  2. Follow a link to github.com

Actual behavior

MAC asks me to choose between opening github.com in the GitLab container or the GitHub container.

This is an issue because I never want to open github.com in a GitLab container; I either want to browse "anonymously" (as much as possible) or logged in to GitHub.

Desired behavior

MAC asks me to choose between opening github.com in a temporary container or the GitHub container

That is, this add-on's isolation feature should trigger before MAC's "Always open in" feature, so MAC will give the option of choosing between a temp container and permanent container instead of two permanent containers. I'm not sure if this is possible. Let me know if a debug log if that would be helpful.

Specs

  • Temporary Containers Version: 0.91
  • Firefox Version: 65.0.2
  • Operating System + Version: Fedora 29
  • Non-default Options/Preferences in Temporary Containers:

    • Isolation > Global > Middle and Control-Left-Clicks both isolate TLDs (not subdomains)

    • Isolation > MAC > MAC Isolation enabled

    • General > Automatic mode enabled

  • Other installed Add-ons + Version: Firefox Multi-Account Containers 6.1.0, HTTPS Everywhere 2019.1.31, Decentraleyes 2.0.10, AdNauseam 3.7.802
enhancement

All 10 comments

I agree that it should let you choose between a new TC and the MAC assigned container on the confirm page if the request matches the preferences to isolate. This already happens if the request originates from the default container or from a TC, but not from permanent containers. Unfortunately, to properly implement it, refactoring of the responsible request handling code would be necessary, because it currently is kind of a mess.

v1.0beta4 includes the refactoring and enhancement to reopen MAC confirm pages always if Isolation applies.

Follow-up: If I'm already in a temporary container, then isolation does not need to trigger before the MAC confirmation page.

Main example:

  • Set Advanced > General > Automatic Mode to Reopen new tabs.
  • Create an Example container and use MAC to set example.com to always open in that container.
  • Open a new tab

    • It gets changed from default to tmpXXX1

  • Type example.com and hit enter

    • MAC confirmation dialog opens (flickers)

    • Temporary containers re-opens the MAC confirmation dialog in tmpXXX2

The current implementation isn't technically broken or anything, it's just a lot of flickering to get to a containerized site from a new tab. I'm happy to put up with that when there's a privacy benefit, but in this case there isn't really any.

I can't reopen this issue; I can put this comment in a new issue, if you'd prefer.

Thanks for the follow-up, that shouldn't happen, I'll look into it.

Interestingly, I just ran into a site/container pair (github.com, in my github container) that does not exhibit this bug. Tested a couple other sites after that and they all have the bug, so not sure what's up with this particular container.

If you happen to have time at hand to provide a debug log for the case where the bug occurs, that'd be helpful, thanks!

tmpContainerMacIsolation.log

  • New tab → tmp7594
  • gog.com[enter] → tmp7595 (Choose between tmp7595 and Gaming)

Thanks for the log, should be fixed in v1.0beta20.

Well, not really fixed yet.

Ok, after testing again, it is actually fixed, hah.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mkruer picture mkruer  Â·  5Comments

Gitoffthelawn picture Gitoffthelawn  Â·  3Comments

r-a-y picture r-a-y  Â·  4Comments

stoically picture stoically  Â·  6Comments

Decopi picture Decopi  Â·  4Comments