diff options
author | Badlop <badlop@process-one.net> | 2009-04-22 15:02:03 +0400 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2009-04-22 15:02:03 +0400 |
commit | 240e37c38762a6abc0cb3a966b034951534c3af7 (patch) | |
tree | f1719d6960866f95a5c940d4efa12f1316f673a9 /src | |
parent | 39f71ab2abe43e97d13d551bace9acde6a68db36 (diff) |
* src/ejabberd_c2s.erl: Fix for SASL Anonymous connections not
stored or purged (thanks to Andy Skelton)(EJAB-912)
SVN Revision: 2032
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_c2s.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 67a55757d..762961a95 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -407,9 +407,9 @@ wait_for_auth({xmlstreamelement, El}, StateData) -> StateData#state.streamid, D) of {true, AuthModule} -> ?INFO_MSG( - "(~w) Accepted legacy authentication for ~s", + "(~w) Accepted legacy authentication for ~s by ~s", [StateData#state.socket, - exmpp_jid:jid_to_binary(JID)]), + exmpp_jid:jid_to_binary(JID), AuthModule]), SID = {now(), self()}, Conn = get_conn_type(StateData), Info = [{ip, StateData#state.ip}, {conn, Conn}, @@ -513,12 +513,14 @@ wait_for_feature_request({xmlstreamelement, #xmlel{ns = NS, name = Name} = El}, StateData#state.socket), send_element(StateData, exmpp_server_sasl:success()), U = proplists:get_value(username, Props), - ?INFO_MSG("(~w) Accepted authentication for ~s", - [StateData#state.socket, U]), + AuthModule = proplists:get_value(auth_module, Props), + ?INFO_MSG("(~w) Accepted authentication for ~s by ~s", + [StateData#state.socket, U, AuthModule]), fsm_next_state(wait_for_stream, StateData#state{ streamid = new_id(), authenticated = true, + auth_module = AuthModule, user = list_to_binary(U) }); {continue, ServerOut, NewSASLState} -> send_element(StateData, @@ -628,8 +630,8 @@ wait_for_sasl_response({xmlstreamelement, #xmlel{ns = NS, name = Name} = El}, send_element(StateData, exmpp_server_sasl:success()), U = proplists:get_value(username, Props), AuthModule = proplists:get_value(auth_module, Props), - ?INFO_MSG("(~w) Accepted authentication for ~s", - [StateData#state.socket, U]), + ?INFO_MSG("(~w) Accepted authentication for ~s by ~s", + [StateData#state.socket, U, AuthModule]), fsm_next_state(wait_for_stream, StateData#state{ streamid = new_id(), |