25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Fix a bug where legacy authentication informations were not search among

the query children but among the IQ children.

PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1616
This commit is contained in:
Jean-Sébastien Pédron 2008-10-10 08:14:08 +00:00
parent 6ab7e339bd
commit e1b3bd611d
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2008-10-10 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_c2s.erl (is_auth_packet/1): Fix a bug where
legacy authentication informations were not search among the query
children but among the IQ children. Thanks to Pablo Polvorin!
2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com> 2008-10-09 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which * src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which

View File

@ -1286,12 +1286,13 @@ new_id() ->
is_auth_packet(El) when ?IS_IQ(El) -> is_auth_packet(El) when ?IS_IQ(El) ->
case exmpp_iq:is_request(El) of case exmpp_iq:xmlel_to_iq(El) of
true -> #iq{ns = ?NS_LEGACY_AUTH, kind = 'request'} = IQ_Rec ->
{auth, exmpp_stanza:get_id(El), exmpp_iq:get_type(El), Children = exmpp_xml:get_child_elements(IQ_Rec#iq.payload),
get_auth_tags(El#xmlel.children, {auth, IQ_Rec#iq.id, IQ_Rec#iq.type,
undefined, undefined, undefined, undefined)}; get_auth_tags(Children , undefined, undefined,
false -> undefined, undefined)};
_ ->
false false
end; end;
is_auth_packet(_El) -> is_auth_packet(_El) ->