Adobe Socket 策略文件服务器问题

发布于 2024-07-28 07:09:24 字数 762 浏览 3 评论 0原文

有没有人能够成功实现一项服务来为 FlashPlayer 提供所需的套接字策略文件?

我正在运行 Adob​​e 提供的服务的 Python 实现,

http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

并使用以下策略文件:

<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy>
 <site-control permitted-cross-domain-policies="master-only"/>
 <allow-access-from domain="*" to-ports="*" secure="false"/>
</cross-domain-policy>

并从 Flash 收到此消息:

[SecurityErrorEvent type="securityError" bubbles=false 
cancelable=false eventPhase=2
text="Error #2048: 
Security sandbox violation: http://www.mapopolis.com/family/Tree.swf   
cannot load data from www.mapopolis.com:1900."]

谢谢。

Has anyone been able to successfully implement a service to serve the required socket policy file to FlashPlayer?

I am running the Python implementation of the service provided by Adobe at

http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

and using the following policy file:

<?xml version="1.0" encoding="UTF-8"?>
<cross-domain-policy>
 <site-control permitted-cross-domain-policies="master-only"/>
 <allow-access-from domain="*" to-ports="*" secure="false"/>
</cross-domain-policy>

and receiving this message from Flash:

[SecurityErrorEvent type="securityError" bubbles=false 
cancelable=false eventPhase=2
text="Error #2048: 
Security sandbox violation: http://www.mapopolis.com/family/Tree.swf   
cannot load data from www.mapopolis.com:1900."]

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

葬﹪忆之殇 2024-08-04 07:11:22

后是否发送尾随 0 字节

<cross-domain-policy>
     <allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>

检查
http://www.lightsphere.com/dev/articles/flash_socket_policy.html

Do you send a trailing 0-byte after the

<cross-domain-policy>
     <allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>

Check the
http://www.lightsphere.com/dev/articles/flash_socket_policy.html

彩扇题诗 2024-08-04 07:10:54

尝试将策略文件托管在端口 843 上,假设您的管理员允许访问 843。这是一个告诉您有关套接字策略文件的链接。

http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files。 html

Try hosting the policy file at port 843, assuming your admin will allow access to 843. Here's a link that tells you about socket policy files.

http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

感悟人生的甜 2024-08-04 07:10:42

假设您使用的是 AS3...

您可以像这样覆盖 flash 中的 crossdomain.xml 策略文件:

Security.allowDomain("*");
Security.allowInsecureDomain("*");

但如果您需要 crossdomain.xml,请确保它位于您尝试访问的服务器的根目录中。 还可以尝试使用完全基本的简单版本以确保其正常工作,例如:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy> 

确保其名为 crossdomain.xml 并位于您的根目录中。

您还可以将策略文件更改为另一个服务器或文件名,如下所示:

Security.loadPolicyFile("http://www.example.com/sub/dir/pf.xml");

如果您使用的是 AS2/flash8(首先很抱歉),那么您需要确保 crossdomain.xml 位于您正在访问的服务器的根目录中。

Assuming you are using AS3...

You can override crossdomain.xml policy files in your flash like this:

Security.allowDomain("*");
Security.allowInsecureDomain("*");

But if you need crossdomain.xml make sure it is in your root of the server you are trying to access. Also try a complely base simple version to make sure it works such as:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy> 

Make sure it is named crossdomain.xml and in your root.

You can also change the policy file to another server or filename like this:

Security.loadPolicyFile("http://www.example.com/sub/dir/pf.xml");

If you are using AS2/flash8 (first off I am sorry) then you will need to be sure crossdomain.xml is in the root of the server you are hitting.

全部不再 2024-08-04 07:10:29

如果您使用 Debian,我已经编写了一个用于提供 Adob​​e 套接字策略文件的 Apache 模块,该模块位于:

http://socketpolicyserver.com

该软件包包含以下位置的工作配置文件:

/usr/share/doc/libapache2-mod-socket-policy-server/examples/

If you're using Debian, I've written an Apache module for serving Adobe socket policy files that is available at:

http://socketpolicyserver.com

The package includes working configuration files in:

/usr/share/doc/libapache2-mod-socket-policy-server/examples/

祁梦 2024-08-04 07:10:17

我现在已经遇到过几次这个问题,尝试使用别人的策略服务器,并编写自己的策略服务器。
我发现所有元素都需要存在:

  • 侦听套接字 843。
  • 当接收到新连接时,读取所有数据。 不要只在连接时发送策略!
  • 或者,您可以测试收到的数据是否是正确的策略请求,或者直接忽略它。 我还没有看到一个很好的理由来验证我的使用情况。
  • 发送带有尾部“\0”字节的 xml。
  • 关闭套接字!
  • 您很可能需要策略的 allowed-access-from 部分中的 secure="false" 选项。

I've hit this a couple of times now, trying to use someone else's policy server, and writing my own.
The elements that I've found that all need to be there:

  • listen on socket 843.
  • When receiving a new connection, read all data. Don't just send the policy on connect!
  • optionally, you can test if the received data is a correct policy request, or just ignore it. I haven't seen a good reason to validate in my usage.
  • send the xml with the trailing "\0" byte.
  • close the socket!
  • more than likely you need the secure="false" option in the allow-access-from section of the policy.
演多会厌 2024-08-04 07:10:07

现在有一个用于 Apache Web 服务器的模块,用于服务器与新的 Flash 9.whatever 和 Flash 10+ 兼容的套接字策略文件,这需要使用 Adob​​e 套接字协议来提供套接字策略文件。

http://www.beamartyr.net/articles/adobepolicyfileserver.html

There's now a module for the Apache webserver to server socket policy files compatible with the new Flash 9.whatever and Flash 10+ which require socket policy files to be served using the Adobe socket protocol.

http://www.beamartyr.net/articles/adobepolicyfileserver.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文