summaryrefslogtreecommitdiff
path: root/pages/account
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-09-09 22:39:52 +0200
committerFelix Dörre <felix@dogcraft.de>2014-09-09 22:52:24 +0200
commit556cd8460d360017ecf66c82d4f24d615fa5e93a (patch)
treea77f00ebcb39af71ad1719e98b8ec4af1f762df2 /pages/account
parent9fdea3c017edc44b46cf539acde0269a9a62a7c8 (diff)
downloadcacert-devel-556cd8460d360017ecf66c82d4f24d615fa5e93a.tar.gz
cacert-devel-556cd8460d360017ecf66c82d4f24d615fa5e93a.tar.xz
cacert-devel-556cd8460d360017ecf66c82d4f24d615fa5e93a.zip
bug-612: adding ip anonymization for secret-question mail
Diffstat (limited to 'pages/account')
-rw-r--r--pages/account/13.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/pages/account/13.php b/pages/account/13.php
index d468b3d..5bbbfcb 100644
--- a/pages/account/13.php
+++ b/pages/account/13.php
@@ -27,10 +27,13 @@
if($showdetails){
$body = sprintf(_("Hi %s,"),$user['fname'])."\n\n";
+ $ip = anonymizeIp($_SERVER['REMOTE_ADDR']);
+ if($ip === false)
+ $ip = "Error";
$body .= sprintf(_("You receive this automatic mail since you yourself or someone ".
"else looked up your secret questions and answers for a forgotten ".
"password.\n\n".
- "IP-Address: %s\nTime: %s\n\n".
+ "Network: %s\nTime: %s\n\n".
"If it was you who looked up or changed that data, or clicked ".
"through the menu in your account, everything is in best order ".
"and you can ignore this mail.\n\n".
@@ -38,7 +41,7 @@
"there is a danger that an unauthorised person accessed your ".
"account, and you should promptly change your password and your ".
"secret questions and answers."),
- $_SERVER['REMOTE_ADDR'],
+ $ip,
date("Y-m-d H:i:s T"))."\n\n";
$body .= _("Best regards")."\n"._("CAcert Support");