这是来自 Chrome 检查器的消息:
The XSS Auditor refused to execute a script in
http://localhost/Disposable Working NOTAS.php
because its source code was found within the request. The auditor was enabled as the server sent neither an 'X-XSS-Protection' nor 'Content-Security-Policy' header.
...我的笔记本电脑上的本地主机上有几十个网站,我在工作流程中使用它们,在过去的几天里,更新后的 Chrome 更改了一些内容,几乎所有网站的文本区域' 内容不再保存到文件中。
保存我所做编辑的代码全部被破坏;我输入新文本,单击 在保存和我的浏览器上,而不是执行脚本中的 file~writing 子例程 对于我正在处理的网页,只需打开一个新的空白页面。如果我随后反击 按钮,文本区域仍然显示新添加的内容,但在文件中,没有变化 正在追加中。
最佳答案
如果您想告诉 Chrome 禁用其 XSS 保护,您可以发送值为 0
的 X-XSS-Protection
header 。由于您似乎使用的是 PHP,因此您可以将其添加到始终在输出任何内容之前执行的位置:
header("X-XSS-Protection: 0");
关于google-chrome - Chromium 的 XSS 审核员拒绝执行脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17016960/