mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Catch error when auth crashes
This commit is contained in:
parent
7aa5e8f435
commit
3727e2426d
@ -243,7 +243,7 @@ get_auth_admin(Auth, HostHTTP, RPath, Method) ->
|
||||
end.
|
||||
|
||||
get_auth_account(HostOfRule, AccessRule, User, Server, Pass) ->
|
||||
case ejabberd_auth:check_password(User, Server, Pass) of
|
||||
case catch ejabberd_auth:check_password(User, Server, Pass) of
|
||||
true ->
|
||||
case is_acl_match(HostOfRule, AccessRule,
|
||||
exmpp_jid:make(User, Server)) of
|
||||
@ -258,7 +258,9 @@ get_auth_account(HostOfRule, AccessRule, User, Server, Pass) ->
|
||||
{unauthorized, "bad-password"};
|
||||
false ->
|
||||
{unauthorized, "inexistent-account"}
|
||||
end
|
||||
end;
|
||||
_ ->
|
||||
{unauthorized, "badformed-jid"}
|
||||
end.
|
||||
|
||||
%%%==================================
|
||||
|
Loading…
Reference in New Issue
Block a user