Closed Bug 258487 Opened 20 years ago Closed 20 years ago

Add pref for blocking popups from plugins.

Categories

(SeaMonkey :: UI Design, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jst, Assigned: jwkbugzilla)

References

Details

(Keywords: fixed-aviary1.0, fixed1.7.5)

Attachments

(4 files, 2 obsolete files)

Spinoff from bug 252326 comment #91.

Wladimir said:

It seems that plugins are the weakest point of the popup blocker now - they are
always allowed to open popups (bug 176079). This patch makes this behavior
configurable - if we have privacy.popups.disable_from_plugins set to true, any
popups opened by a plugin will be blocked unless whitelisted. The pref can be
enabled by default later if necessary (UI would be also nice). Tested on
http://www.pirates.bethsoft.com/flash/fbplus.html - works.

and later on said:

It should be openControlled instead of openAllowed for popups opened by plugins
so that the limit for the number of open popups still applies even if the
plugins are allowed to open popups (killed my browser on the example from bug
176079 comment 5, that helped realizing it).

I'll move the patch over to this bug.
Comment on attachment 158226 [details] [diff] [review]
Block popups opened by plugins (Wladimirs patch from bug 252326)

This looks good, but I'm somewhat worried about this possibly causing problems
if some users in some odd cases rely on lots of windows opened from plugins
since this will limit the number of popups a plugin can open (or have open
simultanously). Maybe we should make this a 3-state pref, block, control,
allow? Wanna change the pref to do that, just to be on the safe side? I.e. make
it an int pref, switch over the value and set a local abuse variable based on
the value of the pref, or something.
Attachment #158226 - Flags: superreview-
Attachment #158226 - Flags: review-
Flags: blocking-aviary1.0PR?
Flags: blocking-aviary1.0?
maybe after PR.
Flags: blocking-aviary1.0PR? → blocking-aviary1.0PR-
Attached patch PatchSplinter Review
It's difficult to imagine a situation where somebody would need this but ok,
it's easy enough to implement. Now privacy.popups.disable_from_plugins is an
integer pref - 0 lets all popups through, 1 limits their number to
dom.popup_maximum (even with popup blocker disabled), 2 blocks popups from
plugins and 3 blocks them even on whitelisted sites.

The testcase disappeared, I will attach my own.
Attachment #158226 - Attachment is obsolete: true
Attached file Testcase (obsolete) —
Attached file Testcase
Attachment #158295 - Attachment is obsolete: true
Comment on attachment 158290 [details] [diff] [review]
Patch

r+sr, though as per discussion with trev on IRC you can't use this to set the
state to openOverride. Only openAbused, openControlled, and openAllowed will
work, and the default will be to allow everything as long as the pref isn't
set...
Attachment #158290 - Flags: superreview+
Attachment #158290 - Flags: review+
Attachment #158290 - Flags: approval1.7.x?
Attachment #158290 - Flags: approval-aviary?
This is the same change for the branches, there's no GetIntPref in
nsContentUtils on the branches, so we'll need to use the pref service, other
than that it's the same change...
ok, ltest get this in for PR
Flags: blocking-aviary1.0PR-
Flags: blocking-aviary1.0PR+
Flags: blocking-aviary1.0?
Flags: blocking-aviary1.0-
Attachment #158290 - Flags: approval1.7.x?
Attachment #158290 - Flags: approval1.7.x+
Attachment #158290 - Flags: approval-aviary?
Attachment #158290 - Flags: approval-aviary+
Fixed on the aviary branch and trunk, marking FIXED.
Status: NEW → RESOLVED
Closed: 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Fixed on the 1.7 branch.
Keywords: fixed1.7.x
*** Bug 267509 has been marked as a duplicate of this bug. ***
Product: Core → Mozilla Application Suite
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050306
Firefox/1.0+
For me, when blocking such popups from plugins, I do not get the 'popup blocked'
icon appear on the firefox statusbar. Is this by design or a bug?

Additionally, www.warp2search.net uses two different popups - the old style ones
that the ff popupblocker can stop, and the new type of flash popup.

With privacy.popups.disable_from_plugins set to 2 I have this problem; when I go
to www.warp2search.net the first normal popup is blocked (and the popup-blocked
icon in firefox's status bar is shown) but when the 2nd new flash popup is
blocked, the popup-blocked icon disappears, which I'm guessing it shouldn't).
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: