25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Merge pull request #181 from weiss/check-tls-before-auth

Check TLS state before requesting SASL EXTERNAL for outgoing s2s connections
This commit is contained in:
Evgeny Khramtsov 2014-04-30 00:36:08 +04:00
commit 8419322884

View File

@ -600,7 +600,9 @@ wait_for_features({xmlstreamelement, El}, StateData) ->
{next_state, stream_established,
StateData#state{queue = queue:new()}};
SASLEXT and StateData#state.try_auth and
(StateData#state.new /= false) ->
(StateData#state.new /= false) and
(StateData#state.tls_enabled or
not StateData#state.tls_required) ->
send_element(StateData,
#xmlel{name = <<"auth">>,
attrs =