r105901 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105900‎ | r105901 | r105902 >
Date:16:32, 12 December 2011
Author:gregchiasson
Status:ok
Tags:
Comment:
AFTv5 - fix a privacy issue introduced by r105448 - apparently we only want to store IP addresses for anonymous submissions, not ones from registered users.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -448,8 +448,13 @@
449449 $link = $params['link'];
450450 $token = $this->getAnonToken( $params );
451451 $timestamp = $dbw->timestamp();
452 - $ip = wfGetIP();
 452+ $ip = null;
453453
 454+ // Only save IP address if the user isn't logged in.
 455+ if( !$wgUser->isLoggedIn() ) {
 456+ $ip = wfGetIP();
 457+ }
 458+
454459 # make sure we have a page/user
455460 if ( !$params['pageid'] || !$wgUser) {
456461 return null;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105448Making long-delayed schema updates to AFTv5, per Roan's feedback in the CodeR...gregchiasson18:37, 7 December 2011

Status & tagging log