alert on unload parents modal dialog to different tab

RESOLVED FIXED in mozilla17

Status

()

defect
RESOLVED FIXED
8 years ago
4 months ago

People

(Reporter: Gavin, Unassigned)

Tracking

({sec-moderate})

Trunk
mozilla17
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sg:moderate spoof])

STR:
1) Open multiple tabs. Load data:text/html,<body onunload="alert('test')"> in one.
2) Close that tab.

Result: alert parented to newly selected (completely unrelated) tab
Expected: no alert

Marking sec-sensitive since there is some spoofing risk here...
I think perhaps the "if we can't do a tab-modal prompt" fallback in ModalPrompter.openPrompt needs to to catch this case?

Or maybe we just need to remove the XXX fallback to activeWindow in openModalWindow...
Chrome has also been investigating disallowing prompts from unload/beforeunload/etc - discussing of that on #whatwg is what prompted discovery of this.
Dolske, I think this is a regression from the modal dialog work you did, can you please have a look?
Assignee: nobody → dolske
Whiteboard: [sg:moderate spoof]
Depends on: 391834
Justin - any chance you can look at this soon or recommend another owner?
This was fixed by bug 391834.
Assignee: dolske → nobody
Group: core-security
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.