This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12391 - showModalDialog() should be blocked by sandbox attribute
Summary: showModalDialog() should be blocked by sandbox attribute
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2011-03-29 07:02 UTC by Jacob Rossi [MSFT]
Modified: 2011-08-04 05:33 UTC (History)
5 users (show)

See Also:


Description Jacob Rossi [MSFT] 2011-03-29 07:02:14 UTC
From the current spec text, it's not clear that window.showModalDialog( ) should be blocked inside a sandboxed iframe. It seems that it should follow in the same suit as 

showModalDialog() should be added to the sentence "This flag also prevents content from creating new auxiliary browsing contexts, e.g. using the target attribute or the method." [1]

Additionally, in the steps for executing showModalDialog [2], the first step should indicate that the UA should abort these steps if the "sandboxed navigation browsing context flag" is set.

Comment 1 Ian 'Hixie' Hickson 2011-06-13 22:27:59 UTC
The sentence "This flag also prevents content from creating new auxiliary browsing contexts, e.g. using the target attribute or the method." is non-normative, and is a rather vague description of reality (which is that it's largely up to the UA what happens). Since you're an implementor, please ignore the non-normative text. :-)

Blocking showModelDialog() seems reasonable. Should it be always blocked, or should the UA have the option of allowing it anyway, as with I'm guessing it should just always block, since it's more synchronous.
Comment 2 Ian 'Hixie' Hickson 2011-06-15 06:14:15 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Accepted
Change Description: see diff given below

Turns out that showModalDialog() was sort of blocked already, in that it would pop up a window but not load anything in the window. Oops. I've made it so that it is blocked earlier.
Comment 3 contributor 2011-06-15 06:28:26 UTC
Checked in as WHATWG revision r6233.
Check-in comment: showModalDialog() inside a sandboxed iframe should be blocked _before_ the window pops up... Also, some minor editorial cleanup in this area.
Comment 4 Michael[tm] Smith 2011-08-04 05:33:45 UTC
mass-move component to LC1