mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Fix register
This commit is contained in:
parent
e4a1eb4370
commit
2ebfd4090a
@ -542,7 +542,7 @@ is_strong_password(Server, Password) ->
|
|||||||
%%% ip_access management
|
%%% ip_access management
|
||||||
%%%
|
%%%
|
||||||
|
|
||||||
may_remove_resource({U, S, _} = From) ->
|
may_remove_resource({U, S, _}) ->
|
||||||
{U, S, ""};
|
{U, S, ""};
|
||||||
may_remove_resource(From) ->
|
may_remove_resource(From) ->
|
||||||
From.
|
From.
|
||||||
@ -595,7 +595,8 @@ parse_ip_netmask(S) ->
|
|||||||
check_ip_access(_Source, []) ->
|
check_ip_access(_Source, []) ->
|
||||||
allow;
|
allow;
|
||||||
check_ip_access({User, Server, Resource}, IPAccess) ->
|
check_ip_access({User, Server, Resource}, IPAccess) ->
|
||||||
case ejabberd_sm:get_user_ip(User, Server, Resource) of
|
JID = exmpp_jid:make(User, Server, Resource),
|
||||||
|
case ejabberd_sm:get_user_ip(JID) of
|
||||||
{IPAddress, _PortNumber} -> check_ip_access(IPAddress, IPAccess);
|
{IPAddress, _PortNumber} -> check_ip_access(IPAddress, IPAccess);
|
||||||
_ -> true
|
_ -> true
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user