[ejabberd] Flash jabber client : Howto serve cross-domain policy

Sergio Bessa sergio.bessa at ideavity.com
Fri Jun 13 18:04:37 MSD 2008


Hi,

Did you had a chance to try this solution? Does it work to provide the 
policy-file? How do you set that up?

Thanks,

Sergio

Badlop wrote:
> On Mon, Jun 9, 2008 at 2:54 PM,  <cplusou-s at yahoo.fr> wrote:
>   
>> How is it possible to modify this script to make it works with the latest
>> version of ejabberd_c2s.erl file ?
>>     
>
> Try this. I only verified it compiles.
> If it really works, please report here, maybe other people is
> interested in the patch.
>
>
> *****************************
> --- src/ejabberd_c2s.erl
> +++ src/ejabberd_c2s.erl
> @@ -387,6 +387,17 @@ wait_for_stream({xmlstreamend, _}, StateData) ->
>      send_text(StateData, ?INVALID_XML_ERR ++ ?STREAM_TRAILER),
>      {stop, normal, StateData};
>
> +wait_for_stream({xmlstreamstart, "policy-file-request", _Attrs}, StateData) ->
> +    ejabberd_socket:reset_stream(StateData#state.socket),
> +    send_text(StateData,
> +             "<?xml version=\"1.0\"?>\n"
> +             "<!DOCTYPE cross-domain-policy SYSTEM "
> +             "\"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd\">\n"
> +             "<cross-domain-policy>\n"
> +             "       <allow-access-from domain=\"*\" to-ports=\"*\"/>\n"
> +             "</cross-domain-policy>\n\0"),
> +    {stop, normal, StateData};
> +
>  wait_for_stream({xmlstreamerror, _}, StateData) ->
>      Header = io_lib:format(?STREAM_HEADER,
>                            ["none", ?MYNAME, " version='1.0'", ""]),
> **********************
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>   


-- 
Sérgio Bessa
*Ideavity, Lda.*
*www*: http://www.ideavity.com
*email*: sergio.bessa at ideavity.com
*tel.* +351 222 012 393

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jabber.ru/pipermail/ejabberd/attachments/20080613/55ecd595/attachment.htm 


More information about the ejabberd mailing list