24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-18 22:15:20 +02: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>
* src/ejabberd_c2s.erl: Fix handling of unauthenticated stanzas which

View File

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