Exempt tabs from container rechecking when they are opened from the same host#1192
Open
blackhole89 wants to merge 4 commits into
Open
Exempt tabs from container rechecking when they are opened from the same host#1192blackhole89 wants to merge 4 commits into
blackhole89 wants to merge 4 commits into
Conversation
maxxcrawford
left a comment
Collaborator
There was a problem hiding this comment.
@blackhole89 Can you please provide some testing steps with reproducible links?
maxxcrawford
requested changes
Jul 7, 2020
maxxcrawford
left a comment
Collaborator
There was a problem hiding this comment.
Blocking this review until testing steps are provided. Thanks!
Author
|
What do you mean by reproducible links? I am not sure if this is still current since I made the PR over two years ago, but I think that the issue I experienced would amount to something like:
Expected behaviour: A new tab in container Y is created and navigated to http://test.com/b.html. Actual behaviour: A new tab in container Y is created and displays the "are you sure you want to open this page in container Y?" confirmation page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now, while the exemption mechanism ensures that you can freely follow links within a domain that has been opened in a different container from the one that it has been assigned to "Always (...) Open in (...)", it does not work when you middle-click to open a link in a new tab. The result is that, for instance, when using containers to log into a website such as github with a nonstandard account while also using middle-click to open new tabs frequently, the user experience is terrible (you get redirected to the confirmation page every single time). (This is exacerbated by the confirmation page interacting badly with addons such as Tree Style Tab.)
Since, as far as I can tell, there is no compelling privacy scenario requiring that you reobtain the user's consent to use nonstandard container C when following a link on host X to open a new tab on the same host (and, as far as I can tell, this is the only class of scenarios in which originUrl and newUrl are on the same host, the active container is not standard for that host and the exemption flag is not set), I propose the following hopefully self-explanatory code fragment to make it so that requests within the same domain always go through and result in a container exemption being set for the tab.