Report problem when mod_rest receives malformed stanza (#65)
This commit is contained in:
parent
c098a763b0
commit
fa47490da4
|
@ -64,7 +64,7 @@ process(Path, Request) ->
|
|||
%% Otherwise, it is considered an ejabberd command to execute.
|
||||
maybe_post_request([$< | _ ] = Data, Host, ClientIp) ->
|
||||
try
|
||||
Stanza = xml_stream:parse_element(Data),
|
||||
Stanza = {xmlel, _, _, _} = xml_stream:parse_element(Data),
|
||||
From = jlib:string_to_jid(xml:get_tag_attr_s(<<"from">>, Stanza)),
|
||||
To = jlib:string_to_jid(xml:get_tag_attr_s(<<"to">>, Stanza)),
|
||||
allowed = check_stanza(Stanza, From, To, Host),
|
||||
|
|
Loading…
Reference in New Issue