Closed Bug 442738 Opened 12 years ago Closed 12 years ago

iframe sets parent iframe href --> NS_ERROR_DOM_PROP_ACCESS_DENIED

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: stevewl234, Unassigned)

References

Details

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?
Sorry, I meant: duplicate of Bug 418559 ?
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
Closed: 12 years ago
Resolution: --- → WONTFIX
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.