mozilla / multi-account-containers

Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs that preserve your privacy. Cookies are separated by container, allowing you to use the web with multiple identities or accounts simultaneously.
https://addons.mozilla.org/firefox/addon/multi-account-containers/
Mozilla Public License 2.0
2.75k stars 344 forks source link

Multi-Account Containers: allow 'Reopen This Site in…' to override current settings #1834

Open maxxcrawford opened 4 years ago

maxxcrawford commented 4 years ago

Filing this on behalf of @adamalton who originally filed this as https://bugzilla.mozilla.org/show_bug.cgi?id=1652522

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

Using Multi-Account Container version 7.0.0.

Scenario 1 (using Gmail as an example):

  1. Set up Mutli-Account containers and create a container called "Google".
  2. Go to https://mail.google.com and sign in to Gmail if not already signed in.
  3. Click on the Mutli-Account Containers menu and choose "Always Open This Site in…" and set mail.google.com to always open in the "Google" container.
  4. In the Mutli-Account Containers menu to to "Manage Containers" => "Google" and check "Limit to Designated Sites".
  5. Open https://mail.google.com in a new tab just to confirm the decision to assign it to the "Google" container.
  6. Log out of Gmail.
  7. Try to sign into Gmail again. The domain accounts.google.com is not assigned to the Google container, and the "Limit to Designated Sites" option is checked, so it opens in the default container instead.
  8. Right click on the tab in the tab bar and choose "Reopen in Container" => "Google".
  9. In the Multi-Account Containers menu to to "Manage Containers" => "Google" => "Manage Site List…" and try to add accounts.google.com to the list of sites for the "Google" container.

Actual results:

At step 7, despite explicitly choosing to reopen the tab in the "Google" container, my chosen settings are enforced upon me. I get that I've chosen those settings, but it would be nice if when explicitly choosing to re-open the site in a specific container that this action overrides those settings.

Perhaps this could be done with a confirmation page. Currently it just re-opens the page in a new tab but ignores the container you've chosen. So "Reopen in container" is half honoured - reopened, but not in that container!

At step 8, there is no option to add another domain to the list. Intuitively it would make sense to me that clicking on "Manage Site List…" allows me to add new sites as well as remove existing ones.

Note that the enforcement of container assignments also applies even without the "Limit to Designated Sites" option. If you've set "Always Open This Site in…" for a particular domain, then choosing "Reopen in Container" for a page on that domain will always just open a duplicate tab in the existing container.

adamalton commented 4 years ago

Thanks Max.

Another problem which is arguably a separate issue, but very much related, is that the "Limit to designated sites" option can get you stuck in redirect loops. Again, just to use Google things as an example:

  1. Asisign mail.google.com and accounts.google.com to a "Google" container.
  2. Check the "Limit to designated sites" option for that container.
  3. Try to open another google-owned domain, such as keep.google.com.

What happens:

  1. keep.google.com is not assigned to the "Google" container, so it gets automatically switched to the default/no container.
  2. Your cookies for *.google.com don't exist in the default container, so you're not logged in, and so keep.google.com redirects you to accounts.google.com.
  3. accounts.google.com is assigned to the "Google" container, so Mutli-Account containers switches you back to the "Google" container.
  4. Your *.google.com cookies are now present again, so accounts.google.com see that you're logged in and redirects you to keep.google.com.
  5. Go to 1.

Because this problem happens with automatic redirects, you are never stationary on keep.google.com for long enough to be able to click on the right buttons to assign it to the "Google" container.

Obviously this problem isn't limited to Google things, but it's a good example

The only workaround that I've found so far is to just un-check the "Limit to designated sites" option to avoid the redirect loop, then assign the new site and then re-check that setting.

If it was possible to go to "Manage Containers" => "" => "Manage Site List…" and manually type a domain name into the list, then that would provide a solution to this problem (albeit not a particularly elegant solution).

Another possible solution would be to (as per the title of this ticket) allow "Reopen This Site in..." to enforce the chosen container, regardless of other settings or which domains the tab gets redirected to.

Thanks for all of your work on this great extension.

adamalton commented 4 years ago

There's already a ticket for manually adding sites to the site list: #1828 But I think that only doing that would not be a full or elegant solution to the problems described here.

emuzychenko commented 4 years ago

Why not consider Site List entries as templates, as I proposed in #1833? So "*.google.com" would represent all subdomains of google.com. It would solve some automatic redirection problems.

grahamperrin commented 3 years ago

Some overlap with #1222 and/or #1414?