Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-03-19 18:23:52 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-03-19 18:23:52 +0300
commit4f1d7c4b661b18787affcc1bbec1867dd91476d2 (patch)
treeb9860128cf5372522ee96b39ab3b84b2098ee159
parentbb20e5f3fae35b4952ff23153dba3f306ca552f0 (diff)
Avoid logging IP addresses in mod_register when it's not desired
Fixes #2326
-rw-r--r--src/mod_register.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mod_register.erl b/src/mod_register.erl
index 38df8e225..98fcc944f 100644
--- a/src/mod_register.erl
+++ b/src/mod_register.erl
@@ -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(