【问题标题】:is the most restrictive policy in crossdomain.xml equivalent to not having at all?crossdomain.xml 中最严格的策略是否等同于根本没有?
【发布时间】:2012-02-09 16:41:16
【问题描述】:

我可以在我的服务器的日志中看到一些 http 404 对于 [mydomain]/crossdomain.xml

我想知道是否要添加此文件并将其配置为具有最严格的策略。即:(取自 html 5 样板文件)

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
-<cross-domain-policy> 
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->

<!-- Most restrictive policy: -->
 <site-control permitted-cross-domain-policies="none"/> 
<!-- Least restrictive policy: -->

<!-- <site-control permitted-cross-domain-policies="all"/> <allow-access-from domain="*" to-ports="*" secure="false"/> <allow-http-request-headers-from domain="*" headers="*" secure="false"/> -->

<!-- If you host a crossdomain.xml file with allow-access-from domain="*" and don’t understand all of the points described here, you probably have a nasty security vulnerability. ~ simon willison -->
 </cross-domain-policy>

就等于没有吗?

我发现与跨域误导有关的 http 404 错误,因此我想摆脱它们,以便更有效地识别真实错误。

【问题讨论】:

  • 我可能不太了解语法,但我相信您上面提出的文件在第 4 行第 1 列(就在开始 标记之前)有一个虚假的“-”。

标签: flash adobe crossdomain.xml html5boilerplate


【解决方案1】:

不完全是。规范指出:

也就是说,根跨域策略不包含 allow-access-from 指令或 HTTP 标头。元政策 “无”阻止使用可能存在的任何其他策略 即使开发商包括他们。拥有是无效的 allow-access-from 或根跨域内的标头策略 元策略为“无”的策略文件。在无效的情况下 policy 既有“none”设置也有其他指令,“none”需要 网站上不允许有优先级且没有权限。

所以,我认为最严格的技术是使用“none”。

【讨论】:

    猜你喜欢
    • 2016-12-07
    • 2017-03-17
    • 2023-02-06
    • 2012-06-26
    • 1970-01-01
    • 2015-02-26
    • 2010-12-27
    • 2011-03-25
    • 2020-03-22
    相关资源
    最近更新 更多