Name: |
flash-policy-file |
Purpose: |
Serve cross domain policy file for Flash |
Author: |
Unknown |
Type: |
Patch |
Requirements: |
Erlang/OTP R12B-0 or higher. |
Download: |
Patch for ejabberd 2.0.1. For newer versions see EJAB-960. |
If your Flash program requires ejabberd to serve a cross domain policy file you can use this patch.
Example result:
echo "<policy-file-request/>%c" | nc localhost 5222
<?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="*" to-ports="5222,5223"/>
</cross-domain-policy>
would looking for support of
would looking for support of this patch on the latest version of ejabberd 2.1.2 or 3.0 and also would be nice if it be part of the ejabberd main source base
unable to access crossdomain.xml
Hi
I am using ejabberd 2.18 version and installed it on Windows (x64bit) server.
I am developing a web client for chat and accessing the ejabberd server on port no: 5280
The issue I am facing is with the crossdomain policy.
I have gone through various posts in this forum as well as on other resources. Tried out the possible solutions , but every thing
has failed to address the issue.
I need a detailed explanation of how to host crossdomain.xml on port no. 5280.
Thanks
Patch updated
would looking for support of this patch on the latest version of ejabberd 2.1.2 or 3.0 and also would be nice if it be part of the ejabberd main source base
I've updated the patch to apply in ejabberd 2.1.2/2.1.x. See the ticket EJAB-960.
Thanks, Badlop. I tried it in
Thanks, Badlop.
I tried it in ejabberd-2.1.2 it works like charm, also have updated the same in ticket column
Not working
New patch @https://support.process-one.net/browse/EJAB-960
But it does not work for me - attempting to get it fixed, vote up the ticket if you are having issues as well.
Serve cross domain policy file for Flash - patch "4"
The strengths of this patch are the result of a number of iterations modifying the code to:
1. only fire on exception
i.e. policy file request format generates xmlns error, so, test for policy file request and response logic put in xmlns error handling routine.
2. automatically reports ports on which ejabberd c2s is listening for xmpp. Generally, this will be 5222, however, some servers might want to use other, non-standard ports.
Ports are not hard-coded in patch. ejabberd.cfg defines listen ports, the patched code identifies the active listen ports. Nice trick by badlop.
If anyone wants script (bash or bat) to use for testing patch without using flash, let me know.
Ubuntu package with patch applied