Runouw
Visitor
|
AS3: How to work with Adobe's security update - 2010/06/12 14:33
After many hours, I have finally come up with a way for Palabre to function properly with AS3's new security changes in policy files. You must make the following change to palabre/palabreClient.py: At the bottom, replace
| Code: |
def sendCrossDomain(self):
"""
Crossdomain generated file
"""
strcross = "<cross-domain-policy>"
cd = config.get("crossdomain", "alloweddomains")
domains = cd.split(" ")
for domain in domains:
if len(domain) > 3:
strcross += "<allow-access-from domain='"+domain+"' to-ports='"+config.get("daemon", "port")+"' />"
strcross += "</cross-domain-policy>"
self.clientSendMessage(strcross)
|
with
| Code: |
def sendCrossDomain(self):
"""
Crossdomain generated file
"""
strcross = '<?xml version="1.0"?>n'
strcross += '<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">n'
strcross += '<cross-domain-policy>n'
strcross += '<site-control permitted-cross-domain-policies="master-only" />n'
cd = config.get("crossdomain", "alloweddomains")
domains = cd.split(" ")
for domain in domains:
if len(domain) > 3:
strcross += "<allow-access-from domain='"+domain+"' to-ports='"+config.get("daemon", "port")+"' secure='false' />n"
strcross += "</cross-domain-policy>n"
self.clientSendMessage(strcross)
|
In AS3:
| Code: | Security.loadPolicyFile("xmlsocket://"+_host+":"+_port);
|
Should be the correct way to access it, be sure to put this line before XMLSocket.connect();
|