]> granicus.if.org Git - ejabberd/commitdiff
Clear SASL state after finishing auth
authorAlexey Shchepin <alexey@process-one.net>
Tue, 21 Jan 2014 11:40:03 +0000 (13:40 +0200)
committerAlexey Shchepin <alexey@process-one.net>
Tue, 21 Jan 2014 11:44:29 +0000 (13:44 +0200)
src/ejabberd_c2s.erl

index c04c97933bd86dbd0d4f3a469fe80c1e9180e2c3..ae5fc97b8daa24d6a7ff23fa9bb7d81449a78343 100644 (file)
@@ -652,6 +652,7 @@ wait_for_feature_request({xmlstreamelement, El},
                                StateData#state{streamid = new_id(),
                                                authenticated = true,
                                                auth_module = AuthModule,
+                                                sasl_state = undefined,
                                                user = U});
            {continue, ServerOut, NewSASLState} ->
                send_element(StateData,
@@ -809,6 +810,7 @@ wait_for_sasl_response({xmlstreamelement, El},
                                StateData#state{streamid = new_id(),
                                                authenticated = true,
                                                auth_module = AuthModule,
+                                                sasl_state = undefined,
                                                user = U});
            {ok, Props, ServerOut} ->
                (StateData#state.sockmod):reset_stream(StateData#state.socket),
@@ -829,6 +831,7 @@ wait_for_sasl_response({xmlstreamelement, El},
                                StateData#state{streamid = new_id(),
                                                authenticated = true,
                                                auth_module = AuthModule,
+                                                sasl_state = undefined,
                                                user = U});
            {continue, ServerOut, NewSASLState} ->
                send_element(StateData,