拒绝执行JavaScript脚本。在请求中找到的脚本的源代码 [英] Refused to execute a JavaScript script. Source code of script found within request

查看:164
本文介绍了拒绝执行JavaScript脚本。在请求中找到的脚本的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WebKit中,我的JavaScript上出现以下错误:

In WebKit I get the following error on my JavaScript:


拒绝执行JavaScript脚本。请求中找到脚本的源代码。

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

代码适用于JavaScript微调器,请参阅 ASCII艺术

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

用于工作的代码OK并且仍然是在Camino和Firefox中正常工作。当页面通过POST保存然后通过GET检索时,似乎只会抛出错误。它发生在Chrome / Mac和Safari / Mac上。

The code used to work OK and is still working correctly 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 happens in both Chrome/Mac and Safari/Mac.

任何人都知道这意味着什么,以及如何解决这个问题?

Anyone know what this means, and how to fix this?

推荐答案

这是一项防止 XSS(十字架)的安全措施攻击。

当一些JavaScript代码通过HTTP POST请求发送到服务器时会发生这种情况,并且相同的代码通过HTTP响应。如果Chrome检测到这种情况,则会拒绝运行该脚本,并且您会收到错误消息拒绝执行JavaScript脚本。在请求中找到的脚本的源代码

This happens when some JavaScript code is sent to the server via an HTTP POST request, and the same code comes back via the HTTP response. If Chrome detects this situation, the script is refused to run, and you get the error message Refused to execute a JavaScript script. Source code of script found within request.

另请参阅此博客文章关于深度安全:新的安全功能

Also see this blogpost about Security in Depth: New Security Features.

这篇关于拒绝执行JavaScript脚本。在请求中找到的脚本的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆