mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Report password change in the log
This commit is contained in:
parent
6fd89f5fe0
commit
f2b5153a8c
1 changed files with 5 additions and 1 deletions
|
@ -268,11 +268,15 @@ try_register_or_set_password(User, Server, Password,
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% @doc Try to change password and return IQ response
|
%% @doc Try to change password and return IQ response
|
||||||
try_set_password(User, Server, Password, #iq{lang = Lang} = IQ) ->
|
try_set_password(User, Server, Password, #iq{lang = Lang, meta = M} = IQ) ->
|
||||||
case is_strong_password(Server, Password) of
|
case is_strong_password(Server, Password) of
|
||||||
true ->
|
true ->
|
||||||
case ejabberd_auth:set_password(User, Server, Password) of
|
case ejabberd_auth:set_password(User, Server, Password) of
|
||||||
ok ->
|
ok ->
|
||||||
|
?INFO_MSG("~s has changed password from ~s",
|
||||||
|
[jid:to_string({User, Server, <<"">>}),
|
||||||
|
ejabberd_config:may_hide_data(
|
||||||
|
jlib:ip_to_list(maps:get(ip, M, {0,0,0,0})))]),
|
||||||
xmpp:make_iq_result(IQ);
|
xmpp:make_iq_result(IQ);
|
||||||
{error, empty_password} ->
|
{error, empty_password} ->
|
||||||
Txt = <<"Empty password">>,
|
Txt = <<"Empty password">>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue