25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Fix bypass for tls-required (thanks to Zeha)

This commit is contained in:
Badlop 2013-09-26 16:41:57 +02:00
parent 07c8bf5064
commit 389a99b2db

View File

@ -293,7 +293,9 @@ wait_for_stream({xmlstreamstart, _Name, Attrs},
[Server])}), [Server])}),
{next_state, stream_established, StateData}; {next_state, stream_established, StateData};
{<<"jabber:server">>, <<"jabber:server:dialback">>, {<<"jabber:server">>, <<"jabber:server:dialback">>,
_Server, _} -> _Server, _} when
(StateData#state.tls_required and StateData#state.tls_enabled)
or (not StateData#state.tls_required) ->
send_text(StateData, ?STREAM_HEADER(<<"">>)), send_text(StateData, ?STREAM_HEADER(<<"">>)),
{next_state, stream_established, StateData}; {next_state, stream_established, StateData};
_ -> _ ->