From ca8eeaac578d04bf18ff83679f4638332f322242 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 22 Apr 2009 11:02:03 +0000 Subject: [PATCH] * src/ejabberd_c2s.erl: Fix for SASL Anonymous connections not stored or purged (thanks to Andy Skelton)(EJAB-912) SVN Revision: 2032 --- ChangeLog | 3 +++ src/ejabberd_c2s.erl | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96cd57737..8cc8ecfd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-04-22 Badlop + * src/ejabberd_c2s.erl: Fix for SASL Anonymous connections not + stored or purged (thanks to Andy Skelton)(EJAB-912) + * src/mod_shared_roster.erl: Support in API to add 'all' as member of a group (thanks to Martin Langhoff)(EJAB-916) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index 79242dda4..78fcd0761 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -449,9 +449,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 ~p", [StateData#state.socket, - jlib:jid_to_string(JID)]), + jlib:jid_to_string(JID), AuthModule]), SID = {now(), self()}, Conn = get_conn_type(StateData), Info = [{ip, StateData#state.ip}, {conn, Conn}, @@ -558,12 +558,14 @@ wait_for_feature_request({xmlstreamelement, El}, StateData) -> {xmlelement, "success", [{"xmlns", ?NS_SASL}], []}), U = xml:get_attr_s(username, Props), - ?INFO_MSG("(~w) Accepted authentication for ~s", - [StateData#state.socket, U]), + AuthModule = xml:get_attr_s(auth_module, Props), + ?INFO_MSG("(~w) Accepted authentication for ~s by ~p", + [StateData#state.socket, U, AuthModule]), fsm_next_state(wait_for_stream, StateData#state{ streamid = new_id(), authenticated = true, + auth_module = AuthModule, user = U }); {continue, ServerOut, NewSASLState} -> send_element(StateData, @@ -691,8 +693,8 @@ wait_for_sasl_response({xmlstreamelement, El}, StateData) -> [{"xmlns", ?NS_SASL}], []}), U = xml:get_attr_s(username, Props), AuthModule = xml:get_attr_s(auth_module, Props), - ?INFO_MSG("(~w) Accepted authentication for ~s", - [StateData#state.socket, U]), + ?INFO_MSG("(~w) Accepted authentication for ~s by ~p", + [StateData#state.socket, U, AuthModule]), fsm_next_state(wait_for_stream, StateData#state{ streamid = new_id(),