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

Open tabs can be closed when opening a webpage from about:newtab, with uBlock Origin installed on Firefox #1184

Closed
7 of 8 tasks
ItielMaN opened this issue Jul 28, 2020 · 11 comments
Labels
Firefox specific to Firefox fixed issue has been addressed

Comments

@ItielMaN
Copy link

ItielMaN commented Jul 28, 2020

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

As in the title. Full STR below.

A specific URL where the issue occurs

https://www19.gogoanime.io/
https://pontoon.mozilla.org/he/amo/all-resources/?string=66616

Steps to Reproduce

  1. Create a new profile on the latest Nightly
  2. Install uBlock Origin from AMO. Don't change any of the extension's default settings
  3. Add a new top site on the New Tab page with the title being "pontoon.mozilla" and its url being "https://pontoon.mozilla.org/he/amo/all-resources/?string=66616"
  4. In a new tab, open this url: https://www15.gogoanime.io/. Wait for it to load and restart Nightly
  5. On a new tab, middle click the "pontoon.mozilla" top site
  6. While still on the same New Tab page, focus the urlbar, start typing "gogo", use the arrow keys to focus and enter the "https://www15.gogoanime.io/" entry from step 4

Expected behavior:

The gogoanime site is opened in the first tab, and the Pontoon tab is still opened. You're left with 2 tabs.

Actual behavior:

The "pontoon.mozilla" tab opened in step 5 is now closed, and the gogoanime site is opened. You're left with 1 tab.

Your environment

  • uBlock Origin version: 1.28.4
  • Browser Name and version: Firefox Nightly 81.0a1 (latest)
  • Operating System and version: Windows 10 build 1909

Notes:

  1. I haven't checked the first checkbox above as I'm still not sure if this is a Firefox bug, a uBlock Origin bug or a filter bug.
  2. I've reported this at bugzilla in bug 1655339, there's a regression range there but I'm unable to bisect further to see which is the exact regressor.
  3. I've filed this here just in case this has nothing to do with Firefox's implementation.
@uBlock-user
Copy link
Contributor

uBlock-user commented Jul 28, 2020

The "pontoon.mozilla" tab opened in step 5 is now closed, and the gogoanime site is opened.

By-design, firefox behavior, because what you did in step no 4.

@ItielMaN
Copy link
Author

By-design, firefox behavior, because what you did in step no 4.

I'm not sure I'm following.
In step 4 I just entered this site so it'd be in the history, so in step 6 I'd be able to select it from the urlbar autocomplete, in a completely different tab.

@gorhill
Copy link
Member

gorhill commented Jul 28, 2020

As per logger, it's a filter issue:

f

EasyList's ^https?:\/\/.*[&%+=]/$popup,domain=0123movies.com|... is causing this.

@gorhill
Copy link
Member

gorhill commented Jul 28, 2020

As per logger, it's a filter issue:

One thing to still investigate, is why pontoon.mozilla.org is seen as the opener of www19.gogoanime.io.

@uBlock-user
Copy link
Contributor

I set the logger to all and not seeing any popup entry appear.

@gorhill
Copy link
Member

gorhill commented Jul 28, 2020

When investigating popups, it's best to set logger output to All to be sure nothing is missed.

@uBlock-user
Copy link
Contributor

Yes, as said in #1184 (comment), I did set it to All, no popup entry appears in the logger.

@gorhill
Copy link
Member

gorhill commented Jul 28, 2020

Well I just followed exactly the repro steps and I can reproduce without problem. Step 6 has to be executed before 10-second elapsed, since this is the delay after which uBO won't consider the new tab to be a popup.

@gorhill
Copy link
Member

gorhill commented Jul 28, 2020

The issue is as follow:

  • Tab A = about:newtab
  • Open new tab B from tab A and navigate to page at pontoon.mozilla.org
  • Tab B = page at pontoon.mozilla.org
  • Result: uBO thinks tab B was opened through tab A (true)
  • Navigate to www15.gogoanime.io in Tab A
  • Result: uBO still thinks tab B was opened by tab A, and this time there is a matching popup filter telling uBO that if www15.gogoanime.io opens a new tab matching a rather broad regex, close tab B.

Normally, uBO will detect that tab B was opened willfully through user interaction, but uBO can't execute code in about:newtab, so it does not get the information as to whether the tab was opened through user interaction or programmatically by malicious JavaScript.

Not sure what the fix will be at this point, but it looks like uBO should mind the timing, i.e. tab A is navigated through a new destination and thus the tab previously opened through tab B should no longer matter.

gorhill added a commit to gorhill/uBlock that referenced this issue Jul 29, 2020
@gorhill gorhill changed the title Open tabs can be closed when opening a webpage from the urlbar suggestions, with uBlock Origin installed on Firefox Open tabs can be closed when opening a webpage from about:newtab, with uBlock Origin installed on Firefox Jul 29, 2020
@uBlock-user uBlock-user added the Firefox specific to Firefox label Aug 2, 2020
@i2324561w2
Copy link

i2324561w2 commented Aug 31, 2020

Sorry, but:

  1. open https://iqdb.org/?url=https%3A%2F%2Fwww.animeclick.it%2Fprove%2Fimg_tmp%2F86689.jpg
  2. middle click TinEye and let it load
  3. click on Gelbooru
  4. TinEye tab is closed

is this problem related to the one I just posted?

@gorhill
Copy link
Member

gorhill commented Aug 31, 2020

@i2324561w2 What you describe is #250.

@gorhill gorhill closed this as completed Sep 14, 2020
@gorhill gorhill added the fixed issue has been addressed label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firefox specific to Firefox fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

4 participants