Opened on 01/24/2016 at 07:54:00 PM
Closed on 02/11/2016 at 01:47:23 PM
Last modified on 08/15/2016 at 05:45:25 PM
#3568 closed defect (fixed)
"window.location is null" error prevents blocking pop-ups
Reported by: | SMed79 | Assignee: | trev |
---|---|---|---|
Priority: | P3 | Milestone: | Adblock-Plus-2.7.2-for-Firefox |
Module: | Adblock-Plus-for-Firefox | Keywords: | |
Cc: | trev, erikvold, mapx, sebastian, greiner, arthur | Blocked By: | #4335 |
Blocking: | Platform: | Firefox | |
Ready: | yes | Confidential: | no |
Tester: | Ross | Verified working: | yes |
Review URL(s): |
Description (last modified by trev)
Environment
OS: Manjaro Linux
Firefox 43.0.4
Adblock Plus 2.7.1
How to reproduce
1- Go to http://delishows.to/show/chicago-med/season/1/episode/6
2- Click anywhere.
Observed behaviour
A pop-up opens: http://fabolele.com:8098/api/v1/cspop redirecting to http://zeroredirect1.com/delishows.to redirecting to http://www.tradeadexchange.com/a/display.php. Blockable items list doesn't show a pop-up. Message "window.location is null" shows up in Error Console pointing to lib/child/utils.js line 64 (function getWindowLocation).
Expected behaviour
Pop-up should be blocked by filter ||zeroredirect1.com^$popup,third-party in EasyList, no error messages.
Background
This site hides the opener of the window using the following code:
var wnd1 = window.open("http://www.google.com/"); var wnd2 = wnd1.open(); setTimeout(function(){ wnd2.location = "http://zeroredirect1.com"; wnd1.close(); }, 100);
So the actual target is being opened via an intermediate window which is immediately closed. The intermediate window being gone makes it impossible for us to retrieve the pop-up's opener, instead we get a dummy window which doesn't have a location.
Attachments (0)
Change History (20)
comment:1 Changed on 01/25/2016 at 01:11:27 PM by mapx
- Cc trev erikvold mapx added
- Component changed from Unknown to Adblock-Plus-for-Firefox
comment:2 Changed on 01/26/2016 at 02:04:25 PM by mapx
comment:3 Changed on 01/26/2016 at 07:30:29 PM by mapx
- Cc sebastian greiner added
comment:4 Changed on 01/26/2016 at 07:31:46 PM by mapx
ublock has already a $popunder feature blocking this sort of ads
comment:5 Changed on 02/04/2016 at 02:39:59 AM by SMed79
another example open an popup in newtab redirect to zeroredirect1.com
http://neodrive.co/embed/QDHS20ASC0DUDU4YDWG3J6EEQ (same click anywhere).
comment:6 Changed on 02/09/2016 at 10:46:47 PM by sebastian
If I understand the issue correctly, this isn't a regression as implied by the title, but refers to the technique that websites deploy to circumvent popup blocking by loading the actual content in the new document, while navigating the current document to a page showing advertisement. It seems that uBlock introduced a $popunder filter option to block this behavior, which seems reasonable and worth consideration.
comment:7 Changed on 02/10/2016 at 11:05:14 AM by Compuitguy
comment:8 Changed on 02/10/2016 at 01:17:14 PM by trev
- Description modified (diff)
- Priority changed from Unknown to P1
- Ready set
- Summary changed from popup blocking broke [ABP 2.7.1] to "window.location is null" error prevents blocking pop-ups
No, this has nothing to do with background redirects, not sure where you've got it from. Both sites open regular pop-ups, triggered by click. The problem is that our code fails to see the location of the pop-up window for some reason. I updated the description and title accordingly.
comment:9 Changed on 02/10/2016 at 01:23:06 PM by trev
Looking at http://hg.mozilla.org/mozilla-central/file/7042e8a19f94/dom/base/nsGlobalWindow.cpp#l9411, window.location can only be null for a window without a docshell. To my knowledge that's supposed to be an impossible situation for Gecko, but maybe something changed...
comment:10 Changed on 02/10/2016 at 01:29:38 PM by trev
I verified that the issue is reproducible in Firefox 38, 44 and 47 - so clearly nothing relevant changed Gecko-wise.
comment:11 Changed on 02/10/2016 at 02:39:05 PM by trev
- Description modified (diff)
comment:12 Changed on 02/10/2016 at 02:44:58 PM by Compuitguy
My comment wasn't related to this issue.
It was a response to the the previous comments about background redirects.
comment:13 Changed on 02/10/2016 at 02:53:35 PM by trev
- Owner set to trev
comment:14 Changed on 02/10/2016 at 03:15:39 PM by trev
- Priority changed from P1 to P3
- Review URL(s) modified (diff)
Decreased priority given that this doesn't appear to be a regression - rather the website messing with us.
comment:15 Changed on 02/11/2016 at 01:47:23 PM by trev
- Milestone set to Adblock-Plus-for-Firefox-next
- Resolution set to fixed
- Status changed from new to closed
comment:16 Changed on 02/24/2016 at 12:10:53 PM by Ross
- Tester changed from Unknown to Ross
- Verified working set
Fixed. The popup tab is opened for a split second, then it is closed.
ABP 2.7.2
Firefox 38.0 / Firefox 43.0.1 / Ubuntu 14.04 x64
comment:17 Changed on 02/25/2016 at 04:37:15 PM by SMed79
Some one can investigate if the data: URI popup can be handled/blocked by ABP on www.jeux.com
comment:18 Changed on 03/08/2016 at 09:45:49 AM by arthur
I checked it with the latest dev build on http://neodrive.co/embed/QDHS20ASC0DUDU4YDWG3J6EEQ but it's not working. It does in Chrome though.
comment:19 Changed on 03/08/2016 at 09:46:48 AM by arthur
- Cc arthur added
comment:20 Changed on 08/15/2016 at 05:45:25 PM by trev
- Blocked By 4335 added
could be the same issue ? ==> https://issues.adblockplus.org/ticket/2095