google-chrome - Chromium 的 XSS 审计员拒绝执行脚本

标签 google-chrome chromium

这是来自 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 改变了一些东西之后,几乎所有网站的文本区域' 内容不再保存到文件中。

用于保存我所做编辑的代码全部损坏;我输入新文本,点击 在保存 和我的浏览器上,而不是执行文件~在脚本中编写子程序 对于我正在使用的网页,只需打开一个新的空白页面。如果我再打后面 按钮,文本区域仍然显示新添加的内容,但在文件中,没有变化 正在追加。

最佳答案

如果您想告诉 Chrome 禁用其 XSS 保护,您可以发送值为 0X-XSS-Protection header 。由于您似乎正在使用 PHP,因此您可以将其添加到始终在输出任何内容之前执行的位置:

header("X-XSS-Protection: 0");

关于google-chrome - Chromium 的 XSS 审计员拒绝执行脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34309237/

相关文章:

html - 按钮不透明度导致 Chrome 中的像素偏移/模糊

javascript - 根据 DOM,“Range.detach”现在是空操作

html - 不透明度 < 1 的元素不在第一列时不会在 chrome 中呈现

javascript - 为什么 JavaScript 的 getElementsByClassName 提供的对象不是数组?

javascript - node.js win10 puppeteerexecutablePath 字符串

chromium - Opera远程设备调试

javascript - getUserMedia() 的解析约束无法正常工作 (WebRTC)

javascript - 在特定执行上下文 (iframe) 上运行 javascript

google-chrome - Google Chrome 开发者工具中的 Step 和 Step Into 有什么区别?

google-chrome - 在 Mac 上启动自定义品牌 Chromium 构建时出现 "icudtl.dat not found in bundle"?