r48542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48541‎ | r48542 | r48543 >
Date:23:24, 18 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Report createaccounts as 'user creating own accounts', rather than as 'IP creating user'
Modified paths:
  • /trunk/extensions/AbuseFilter/AbuseFilter.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php
@@ -524,6 +524,7 @@
525525
526526 $var_dump = self::storeVarDump( $vars );
527527 $var_dump = "stored-text:$var_dump"; // To distinguish from stuff stored directly
 528+ $action = $vars->getVar( 'ACTION' )->toString();
528529
529530 // Create a template
530531 $log_template = array(
@@ -534,8 +535,13 @@
535536 'afl_namespace' => $title->getNamespace(),
536537 'afl_title' => $title->getDBKey(),
537538 'afl_ip' => wfGetIp() );
 539+
 540+ // Hack to avoid revealing IPs of people creating accounts
 541+ if (!$wgUser->getId() && $action == 'createaccount') {
 542+ $log_template['afl_user_text'] = $vars->getVar( 'accountname' )->toString();
 543+ }
538544
539 - self::addLogEntries( $actions_taken, $log_template, $vars->getVar( 'ACTION' )->toString() );
 545+ self::addLogEntries( $actions_taken, $log_template, $action );
540546
541547 $error_msg = $error_msg == '' ? true : $error_msg;
542548

Status & tagging log