diff options
author | Simon McVittie <smcv@debian.org> | 2014-10-12 18:03:28 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-10-12 18:03:28 +0100 |
commit | 4e2bfe1e17b3bb142aef116e0731d5a8c36d8179 (patch) | |
tree | 967ad07ce5bea1e480ee187d32be0fd7e965e85a /IkiWiki | |
parent | 08fd2e0806076803a354cd2ce167ba6f875358d5 (diff) | |
download | ikiwiki-4e2bfe1e17b3bb142aef116e0731d5a8c36d8179.tar ikiwiki-4e2bfe1e17b3bb142aef116e0731d5a8c36d8179.tar.gz |
comments: don't log remote IP address for signed-in users
The intention was that signed-in users (for instance via httpauth,
passwordauth or openid) are already adequately identified, but
there's nothing to indicate who an anonymous commenter is unless
their IP address is recorded.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 98ae13810..c5177833f 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -468,12 +468,15 @@ sub editcomment ($$) { $username =~ s/"/"/g; $content .= " username=\"$username\"\n"; } + if (defined $session->param('nickname')) { my $nickname = $session->param('nickname'); $nickname =~ s/"/"/g; $content .= " nickname=\"$nickname\"\n"; } - elsif (defined $session->remote_addr()) { + + if (!(defined $session->param('name') || defined $session->param('nickname')) && + defined $session->remote_addr()) { $content .= " ip=\"".$session->remote_addr()."\"\n"; } |