Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this javascript error mean? Permission denied to call method to Location.toString

This error just started popping up all over our site.

Permission denied to call method to Location.toString

I'm seeing google posts that suggest that this is related to flash and our crossdomain.xml. What caused this to occur and how do you fix?

like image 616
Kevin Goff Avatar asked Aug 27 '08 16:08

Kevin Goff


2 Answers

Are you using javascript to communicate between frames/iframes which point to different domains? This is not permitted by the JS "same origin/domain" security policy. Ie, if you have

<iframe name="foo" src="foo.com/script.js">
<iframe name="bar" src="bar.com/script.js">

And the script on bar.com tries to access window["foo"].Location.toString, you will get this (or similar) exceptions. Please also note that the same origin policy can also kick in if you have content from different subdomains. Here you can find a short and to the point explanation of it with examples.

like image 51
Grey Panther Avatar answered Sep 23 '22 20:09

Grey Panther


You may have come across this posting, but it appears that a flash security update changed the behaviour of the crossdomain.xml, requiring you to specify a security policy to allow arbitrary headers to be sent from a remote domain. The Adobe knowledge base article (also referenced in the original post) is here.

like image 21
Garthmeister J. Avatar answered Sep 20 '22 20:09

Garthmeister J.