ejabberd - Comments for "How to set up http-bind + crossdomain.xml" https://www.ejabberd.im/node/2833 en why didn't you test it. Give https://www.ejabberd.im/node/2833#comment-57653 <p>why didn't you test it. Give a solution to this issue.</p> Wed, 27 Jul 2011 11:30:50 +0000 rafay comment 57653 at https://www.ejabberd.im Can you post the working patch? https://www.ejabberd.im/node/2833#comment-54383 <p>Hey Mike,</p> <p>Can you post the changes you made to get this patch working? Thanks!</p> Mon, 22 Jun 2009 19:27:47 +0000 crash2burn comment 54383 at https://www.ejabberd.im If you are using the older https://www.ejabberd.im/node/2833#comment-53735 <p>If you are using the older ejabberd 1.X you will need to change the reset_stream command.</p> <p>Replace:</p> <div class="codeblock"><code>ejabberd_socket:reset_stream(StateData#state.socket)</code></div> <p>with:</p> <div class="codeblock"><code>ejabberd_receiver:reset_stream(StateData#state.receiver)</code></div> Mon, 10 Nov 2008 21:54:16 +0000 dS_Jeffrey comment 53735 at https://www.ejabberd.im crossdomain.xml and ejabberd working with XIFF (no patching) https://www.ejabberd.im/node/2833#comment-53458 <p>What we did was to make sure the virtual host name (set during installation or listed in the ejabberd.cfg) is exactly the same as the domain name serving the crossdomain.xml file. We did have issues with getting http-bind to serve the crossdomain.xml so we just installed Apache and used that instead. So:</p> <p>Virtual host = xmpp.example.com (configured in ejabberd)<br /> Web server URL = <noindex><a href="http://xmpp.example.com" title="http://xmpp.example.com" rel="nofollow" >http://xmpp.example.com</a></noindex> (served by the Apache installation)<br /> crossdomain.xml was placed in the root of the Apache web server</p> <p>Note: we used the standard configuration of ejabberd and made no modifications to the 5280 listeners. We didn't use the patch. We are using the windows version.</p> <p>I hope this helps those still struggling to get this working. We are still trying to fine tune the configuration.</p> Tue, 29 Jul 2008 20:12:56 +0000 moze comment 53458 at https://www.ejabberd.im You can check this patch https://www.ejabberd.im/node/2833#comment-53356 <p>You can check this patch recently updated: <noindex><a href="/flash-policy-file" rel="nofollow" >Serve cross domain policy file for Flash</a></noindex></p> Tue, 01 Jul 2008 15:03:42 +0000 mfoss comment 53356 at https://www.ejabberd.im Yes, it works also for me :) https://www.ejabberd.im/node/2833#comment-53343 <p>Unfortunately, I have no experience with Erlang at all... BTW, I managed to successfull patch the ejabberd_c2s_erl file (ejabberd 2.0.1_2)</p> <p>Maybe, this is not OK in words of preformance... I don't know, sorry, but it works!</p> <p>You should add following lines right after "Func: StateName/2" comment block (line 222)</p> <p>---------------</p> <div class="codeblock"><code>wait_for_stream({xmlstreamstart, &quot;policy-file-request&quot;, _Attrs}, StateData) -&gt;<br />&nbsp;&nbsp;&nbsp; ejabberd_socket:reset_stream(StateData#state.socket),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; send_text(StateData,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&lt;?xml version=\&quot;1.0\&quot;?&gt;\n&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&lt;!DOCTYPE cross-domain-policy SYSTEM &quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\&quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\&quot;&gt;\n&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&lt;cross-domain-policy&gt;\n&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;allow-access-from domain=\&quot;*\&quot; to-ports=\&quot;5222\&quot;/&gt;\n&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;allow-access-from domain=\&quot;*\&quot; to-ports=\&quot;5269\&quot;/&gt;\n&quot; %% in case your ejabberd also configured to answer the legacy jabber port -5269<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&lt;/cross-domain-policy&gt;\n\0&quot;),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {stop, normal, StateData};</code></div> <p>----------</p> <p>I think, it's not a very good idea to allow all ports to flash clients... I'm afraid, some "bad guys" can write flash-client, that quickly requests thousands web-pages, for example... and put this client (with invisible or small layout) to popular web-site... and You can get something like DDOS attack (thousands connections from different IP's)</p> <p>Regards,</p> Fri, 27 Jun 2008 16:35:07 +0000 philipj comment 53343 at https://www.ejabberd.im [ejabberd] Flash jabber client : Howto serve cross-domain policy https://www.ejabberd.im/node/2833#comment-53337 <p>Patched/Compiled/Implemented.</p> <p>With the patched version, returns stream:error - invalid namespace xmlns.</p> <p>Unpatched version returns same error.</p> <p>Perhaps patched section of code never get's executed.</p> <p>I would suggest (for a number of reasons) putting the test for policy-file-request inside the stream error segment.</p> <p>NOTE: MADE SOME CHANGES, now works. Advised author.</p> Tue, 24 Jun 2008 22:10:42 +0000 MikeDunne comment 53337 at https://www.ejabberd.im policy-file-request on ejabberd_c2s port patch - SUCCESS https://www.ejabberd.im/node/2833#comment-53339 <p>Just sent off an eMail to badlop to confirm patch relocation.</p> <p>I patched and compiled the code referred to in badlop's post.</p> <p>Didn't work.</p> <p>I moved the code in the patch file to a different location in the code. It then worked.</p> <p>I've sent an eMail to badlop advising him of the success on my server. It may be best for badlop to check, test and revise so that the relocation doesn't cause unforeseen problems on other's servers.</p> <p>Works very nicely. Solves the immediate problem.</p> <p>-=MD=-</p> Tue, 24 Jun 2008 22:10:07 +0000 MikeDunne comment 53339 at https://www.ejabberd.im Patch available, but not confirmed yet to work https://www.ejabberd.im/node/2833#comment-53328 <p>There is a patch proposed in the mailing list, but I didn't test it, and the person that posted it didn't mention if it works for him now. The patch for ejabberd 2.0.1 is in this email: <noindex><a href="http://lists.jabber.ru/pipermail/ejabberd/2008-June/003831.html" rel="nofollow" >[ejabberd] Flash jabber client : Howto serve cross-domain policy</a></noindex>.</p> <p>If you can try the patch, please tell here if it works correctly or not.</p> Sat, 21 Jun 2008 11:54:01 +0000 mfoss comment 53328 at https://www.ejabberd.im crossdomain.xml and http-bind from the same port 5280 https://www.ejabberd.im/node/2833#comment-53327 <p>Hi,</p> <p>i was able to setup http-bind in port 5280 and jwchat client can work properly.</p> <p>but when using xiff/BOSH client, flash complains that it cannot find the policy file from<br /> my ejabber server domain.</p> <p>my ejabberd server is <noindex><a href="http://jabber.foo.com:5280/http-bind" title="http://jabber.foo.com:5280/http-bind" rel="nofollow" >http://jabber.foo.com:5280/http-bind</a></noindex></p> <p>I setup my ejabberd.cfg as below.</p> <p> {5280, ejabberd_http, [<br /> http_poll,<br /> http_bind,<br /> web_admin,<br /> {request_handlers, [<br /> {["presence"], mod_webpresence},<br /> {["web"], mod_http_fileserver}<br /> ]}</p> <p>but i get the policy error on the client as follows.</p> <p>Warning: Failed to load policy file from <noindex><a href="http://jabber.foo.com:5280/crossdomain.xml" title="http://jabber.foo.com:5280/crossdomain.xml" rel="nofollow" >http://jabber.foo.com:5280/crossdomain.xml</a></noindex><br /> Error: Request for resource at <noindex><a href="http://jabber.foo.com:5280/http-bind/" title="http://jabber.foo.com:5280/http-bind/" rel="nofollow" >http://jabber.foo.com:5280/http-bind/</a></noindex> by requestor from <noindex><a href="http://cybersnl.bar.com/assets/flash/fx_jabber.swf" title="http://cybersnl.bar.com/assets/flash/fx_jabber.swf" rel="nofollow" >http://cybersnl.bar.com/assets/flash/fx_jabber.swf</a></noindex> is denied due to lack of policy file permissions.</p> <p>Since the docroot of the http file server is at <noindex><a href="http://jabber.foo.com:5280/web" title="http://jabber.foo.com:5280/web" rel="nofollow" >http://jabber.foo.com:5280/web</a></noindex> as per the above config, how<br /> is the flash client supposed to load the policy file from <noindex><a href="http://jabber.foo.com:5280/crossdomain.xml" title="http://jabber.foo.com:5280/crossdomain.xml" rel="nofollow" >http://jabber.foo.com:5280/crossdomain.xml</a></noindex>?</p> <p>i tried using "/" in the request handler instead of "web" to get around that. but no success.</p> <p>has anybody got it to work yet?</p> <p>i will appreciate any suggestions or tips. I will be thankful.</p> Sat, 21 Jun 2008 02:52:07 +0000 cybersnl comment 53327 at https://www.ejabberd.im Only one request_handlers, and put inside all the handlers https://www.ejabberd.im/node/2833#comment-51794 <p>You were quite close to the solution, try this one :)</p> <pre>{listen, [ ... {5280, ejabberd_http, [ http_poll, web_admin, {request_handlers, [ {["http-bind", "con"], mod_http_bind}, {["http-bind"], mod_http_fileserver} ] } ]} ]}.</pre> Tue, 12 Feb 2008 15:21:25 +0000 mfoss comment 51794 at https://www.ejabberd.im