views:

1017

answers:

3

In WebKit I get the following error on my JavaScript:

Refused to execute a JavaScript script. Source code of script found within request.

The code is for a JavaScript spinners, see ASCII Art.

The code used to be working OK, and is still working correct in Camino and Firefox. The error only seems to be thrown when the page is saved via a POST and then retrieved via a GET. It both happens in Chrome/Mac and Safari/Mac.

Anyone knows what this mean, and how to fix this?

+4  A: 

It's a security measure to prevent XSS (cross-site scripting) attacks.

Greg
It would be nice to see some kind of reference.
kangax
+2  A: 

Do you have an example of a page that generates the error? I'm one of the developers of the XSS filter and I'd like to see if we can eliminate this false positive. Thanks.

Adam Barth
Just click "ASCII Art" in the question.
doekman
@Adam: Is this the filter you're talking about? http://lists.macosforge.org/pipermail/webkit-dev/2008-December/006033.html
doekman
Looks like we fixed this when we made the filter a bit tighter to reduce the false positives. Thanks for the feedback!
Adam Barth
Not 100%. I just saved the page in Chrome/Mac, and I got the afore mentioned error message. It seems only to happen when the page is saved and retrieved with a post (or a get after post, I can't see that right now). @Adam: does this ring a bell?
doekman
A: 

Same error coming up here with the latest version of Chrome: https://wave.google.com/wave/#restored%3Awave%3Agooglewave.com!w%252BLby6vkE9A.1

Is this the same error?

Kirk