Index: trunk/extensions/AbuseFilter/AbuseFilter.class.php |
— | — | @@ -524,6 +524,7 @@ |
525 | 525 | |
526 | 526 | $var_dump = self::storeVarDump( $vars ); |
527 | 527 | $var_dump = "stored-text:$var_dump"; // To distinguish from stuff stored directly |
| 528 | + $action = $vars->getVar( 'ACTION' )->toString(); |
528 | 529 | |
529 | 530 | // Create a template |
530 | 531 | $log_template = array( |
— | — | @@ -534,8 +535,13 @@ |
535 | 536 | 'afl_namespace' => $title->getNamespace(), |
536 | 537 | 'afl_title' => $title->getDBKey(), |
537 | 538 | '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 | + } |
538 | 544 | |
539 | | - self::addLogEntries( $actions_taken, $log_template, $vars->getVar( 'ACTION' )->toString() ); |
| 545 | + self::addLogEntries( $actions_taken, $log_template, $action ); |
540 | 546 | |
541 | 547 | $error_msg = $error_msg == '' ? true : $error_msg; |
542 | 548 | |