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

"Limit to designated sites" conflict with other Container addons #2350

Open
erosman opened this issue May 2, 2022 · 1 comment
Open

"Limit to designated sites" conflict with other Container addons #2350

erosman opened this issue May 2, 2022 · 1 comment
Labels
bug Something is broken! Status: Addon Compatibility Issues related to compatibility issues with other addons

Comments

@erosman
Copy link

erosman commented May 2, 2022

If "Firefox Multi-Account Containers" is installed and "Limit to designated sites" is enabled (without any sites listed, there will be a conflict with another container addon (FoxyTab).

I am not sure where the exact conflict is as the addons behaviours are not the same. I look forward to feedback and will work on eliminating the issue.

  • FoxyTab only deals with Tab URL and although it does have "Limit to designated sites", it only comes to effect when navigating
  • "Limit to designated sites" in Firefox Multi-Account Containers appears to affect the content of the tab

Actual behavior

  • Default Firefox Multi-Account Containers with no sites and "Limit to designated sites" enabled
  • FoxyTab set to open example.com in Personal container & "Limit to designated sites" disabled
  • Opening example.com
  • FoxyTab opens example.com in a new Personal container (its function ends there)
  • An endless loop starts as it appears that "Firefox Multi-Account Containers" is re-navigating the tab
  • No conflict occurs if "Limit to designated sites" is disabled in Firefox Multi-Account Containers

Expected behavior

Once a tab is opened in a container, there shouldn't be a need for re-navigating it

Notes

Maybe there is a need to limit access when there are more than one addon is handling an API, similar to Network Settings addons 🤔

@erosman
Copy link
Author

erosman commented May 3, 2022

It appears that when a container tab is opened by another process and that site is not listed, and siteIsolation is true, addon attempts to remove the tab and re-open it in the default container which creates an endless loop with the other addon.

I would suggest that siteIsolation should only come into effect:

  • if there are listed sites
  • if the tab is navigating from a LISTED site in a container to an UNLISTED site

// - the current tab's container is locked and only allows "www.google.com"
// - the incoming request is for "www.amazon.com", which has no specific container assignment
// - in this case, we must re-open "www.amazon.com" in a new tab in the default container
const siteIsolatedReloadInDefault =
await this._maybeSiteIsolatedReloadInDefault(siteSettings, tab);
if (!siteIsolatedReloadInDefault) {
if (!siteSettings
|| userContextId === siteSettings.userContextId
|| this.storageArea.isExempted(options.url, tab.id)) {
return {};
}
}
const replaceTabEnabled = await this.storageArea.getReplaceTabEnabled();
const removeTab = backgroundLogic.NEW_TAB_PAGES.has(tab.url)
|| (messageHandler.lastCreatedTab
&& messageHandler.lastCreatedTab.id === tab.id)
|| replaceTabEnabled;
const openTabId = removeTab ? tab.openerTabId : tab.id;

@dannycolin dannycolin added Status: Addon Compatibility Issues related to compatibility issues with other addons bug Something is broken! labels Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken! Status: Addon Compatibility Issues related to compatibility issues with other addons
Projects
None yet
Development

No branches or pull requests

2 participants