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,
SubName /= "error"],
{case NonErrorEls of
[NonErrorEl] -> xml:get_tag_attr_s("xmlns", NonErrorEl);
_ -> invalid
[NonErrorEl] ->
xml:get_tag_attr_s("xmlns", NonErrorEl);
_ ->
invalid
end,
FilteredEls};
_ ->
{invalid, invalid}
{invalid, []}
end,
if XMLNS == "", Class == request ->
invalid;
XMLNS == invalid ->
invalid;
true ->
#iq{id = ID,
type = Type1,