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

Fix check_from/2 formatting

This commit is contained in:
Radosław Szymczyszyn 2014-05-20 12:30:52 +01:00
parent b7a542e074
commit 5726636053

View File

@ -2458,23 +2458,27 @@ is_ip_blacklisted({IP, _Port}) ->
%% returns invalid-from|NewElement %% returns invalid-from|NewElement
check_from(El, FromJID) -> check_from(El, FromJID) ->
case xml:get_tag_attr(<<"from">>, El) of case xml:get_tag_attr(<<"from">>, El) of
false -> El; false ->
{value, SJID} -> El;
JID = jlib:string_to_jid(SJID), {value, SJID} ->
case JID of JID = jlib:string_to_jid(SJID),
error -> 'invalid-from'; case JID of
#jid{} -> error ->
if (JID#jid.luser == FromJID#jid.luser) and 'invalid-from';
(JID#jid.lserver == FromJID#jid.lserver) #jid{} ->
and (JID#jid.lresource == FromJID#jid.lresource) -> if
El; (JID#jid.luser == FromJID#jid.luser) and
(JID#jid.luser == FromJID#jid.luser) and (JID#jid.lserver == FromJID#jid.lserver) and
(JID#jid.lserver == FromJID#jid.lserver) (JID#jid.lresource == FromJID#jid.lresource) ->
and (JID#jid.lresource == <<"">>) -> El;
El; (JID#jid.luser == FromJID#jid.luser) and
true -> 'invalid-from' (JID#jid.lserver == FromJID#jid.lserver) and
end (JID#jid.lresource == <<"">>) ->
end El;
true ->
'invalid-from'
end
end
end. end.
fsm_limit_opts(Opts) -> fsm_limit_opts(Opts) ->