iframe sets parent iframe href --> NS_ERROR_DOM_PROP_ACCESS_DENIED

RESOLVED WONTFIX

Status

()

Firefox
General
RESOLVED WONTFIX
10 years ago
10 years ago

People

(Reporter: Steve, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0

Error: uncaught exception: [Exception... "Access to property denied"  code: "1010" nsresult: "0x805303f2 (NS_ERROR_DOM_PROP_ACCESS_DENIED)"  location: "http://localhost/stap/test_iframe.html Line: 2"]

Reproducible: Always

Steps to Reproduce:
Create three files on a local webserver:

#test_wrapper.html
<iframe src="http://127.0.0.1/test_parent.html" /></iframe>

#test_parent.html
<iframe src="http://localhost/test_iframe.html" /></iframe>

#test_iframe.html
<script type="text/javascript" charset="utf-8">
   window.parent.location.href = "test_parent.html#message";
</script>

You can access fine at http://localhost/test_wrapper.html but you get a javascript error when you try http://127.0.0.1/test_wrapper.html. This worked fine in Firefox 2.
Actual Results:  
Error message

Expected Results:  
test_parent's url should have been updated
Could you attach a testcase to this bug with the "Add an attachment" link?
Duplicate of Bug 314787 ?
Sorry, I meant: duplicate of Bug 418559 ?

Comment 4

10 years ago
This was an intentional change for security reasons, and is unlikely to be reverted.  See http://crypto.stanford.edu/websec/frames/navigation/ and bug 408052.

You might be allowed to change location.hash instead.
Blocks: 408052
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WONTFIX

Comment 5

10 years ago
This would be a duplicate of bug 418559 if bug 418559 hadn't become a tech evang bug for a specific site ;)
You need to log in before you can comment on or make changes to this bug.