Closed Bug 67229 Opened 25 years ago Closed 24 years ago

acessing window.closed of a window causes a an access denied exception

Categories

(Core :: DOM: Core & HTML, defect)

x86
Other
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: martin.honnen, Assigned: security-bugs)

References

()

Details

(Keywords: dom0)

Attachments

(1 file)

With NN4 and IE4-5.5 you can open a window with a url from a remote host and then check the window.closed property of that window. Mozilla fires an access denied exception in this case. I think Mozilla should be compliant with NN4 and IE here and allow access to window.closed. Example code var win = open('http://www.yahoo.com', 'yahoo'); setTimeout('alert("win.closed = " + win.closed);', 2000); should show an alert but shows an error in the JavaScript console.
Sounds reasonable to me, reassigning to mstoltz.
Assignee: jst → mstoltz
Sure, I'll make window.closed fully accessible.
Status: NEW → ASSIGNED
Netscape 6 throws an NS_NOINTERFACE exception when using the method as follow: window.open( url, "saveAsWindow", "toolbar=no, resizable=yes, height=580, width=780" ); It works fine without the third parameter: window.open( url, "saveAsWindow" ); <script language="javascript"> <!-- var theDownloadWindow = null; function WindowOpen(url) { if( theDownloadWindow && !theDownloadWindow.closed) { theDownloadWindow.focus(); return false; } theDownloadWindow = window.open( url, "saveAsWindow", "toolbar=no,resizable=yes,height=580,width=780" ); theDownloadWindow.opener = this; theDownloadWindow.focus(); } //--> </script> <html> <body> <a HREF='#' ONCLICK='WindowOpen("http://www.yahoo.com"); return false;'>Click! </a> </body> </html>
Keywords: dom0
Mass changing milestones to Moz0.9.1. Many of these bugs are dependent on the XPConnected DOM and its associated security UI changes.
Target Milestone: --- → mozilla0.9.1
really this time.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified with 2001-06-05-11.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: