25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

iq_query_info/1 now returns 'invalid' if XMLNS is invalid

SVN Revision: 2953
This commit is contained in:
Evgeniy Khramtsov 2010-02-02 12:20:19 +00:00
parent 46c667c567
commit d9e345a4d8

View File

@ -404,15 +404,19 @@ iq_info_internal({xmlelement, Name, Attrs, Els}, Filter) when Name == "iq" ->
<- FilteredEls, <- FilteredEls,
SubName /= "error"], SubName /= "error"],
{case NonErrorEls of {case NonErrorEls of
[NonErrorEl] -> xml:get_tag_attr_s("xmlns", NonErrorEl); [NonErrorEl] ->
_ -> invalid xml:get_tag_attr_s("xmlns", NonErrorEl);
_ ->
invalid
end, end,
FilteredEls}; FilteredEls};
_ -> _ ->
{invalid, invalid} {invalid, []}
end, end,
if XMLNS == "", Class == request -> if XMLNS == "", Class == request ->
invalid; invalid;
XMLNS == invalid ->
invalid;
true -> true ->
#iq{id = ID, #iq{id = ID,
type = Type1, type = Type1,