24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00

Avoid logging IP addresses in mod_register when it's not desired

Fixes #2326
This commit is contained in:
Evgeniy Khramtsov 2018-03-19 18:23:52 +03:00
parent bb20e5f3fa
commit 4f1d7c4b66

View File

@ -326,7 +326,8 @@ try_register(User, Server, Password, SourceRaw, Lang) ->
?INFO_MSG("The account ~s was registered "
"from IP address ~s",
[jid:encode({User, Server, <<"">>}),
ip_to_string(Source)]),
ejabberd_config:may_hide_data(
ip_to_string(Source))]),
send_welcome_message(JID),
send_registration_notifications(
?MODULE, JID, Source),
@ -395,8 +396,9 @@ send_registration_notifications(Mod, UJID, Source) ->
"IP address ~s on node ~w using ~p.",
[get_time_string(),
jid:encode(UJID),
ip_to_string(Source), node(),
Mod])),
ejabberd_config:may_hide_data(
ip_to_string(Source)),
node(), Mod])),
lists:foreach(
fun(JID) ->
ejabberd_router:route(