r100247 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100246‎ | r100247 | r100248 >
Date:17:57, 19 October 2011
Author:aaron
Status:old (Comments)
Tags:
Comment:
commit live blocklist hack
Modified paths:
  • /branches/wmf/1.17wmf1/includes/specials/SpecialIpblocklist.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/specials/SpecialIpblocklist.php
@@ -450,6 +450,13 @@
451451 # Prepare links to the blocker's user and talk pages
452452 $blocker_id = $block->getBy();
453453 $blocker_name = $block->getByName();
 454+
 455+ # WMF patch as above
 456+ if ( IP::isIPAddress( $blocker_name ) ) {
 457+ $blocker_name = '(steward)';
 458+ }
 459+ # End patch
 460+
454461 $blocker = $sk->userLink( $blocker_id, $blocker_name );
455462 $blocker .= $sk->userToolLinks( $blocker_id, $blocker_name );
456463
@@ -548,6 +555,12 @@
549556 # The last few lines of Title::secureAndSplit() tell the story.
550557 foreach ( $this->mResult as $row ) {
551558 $name = str_replace( ' ', '_', $row->ipb_by_text );
 559+ # WMF patch for privacy leak in 1.18 CentralAuth -- TS 2011-09-29
 560+ if ( IP::isIPAddress( $name ) ) {
 561+ $name = '(steward)';
 562+ }
 563+ # End patch
 564+
552565 $lb->add( NS_USER, $name );
553566 $lb->add( NS_USER_TALK, $name );
554567 $name = str_replace( ' ', '_', $row->ipb_address );

Comments

#Comment by Siebrand (talk | contribs)   18:38, 19 October 2011

If WMF still running 1.17 wikis? I thought everything was 1.18 now?

#Comment by Brion VIBBER (talk | contribs)   22:08, 19 October 2011

As noted above -- is this also on 1.18wmf1? And what causes the bug in the first place?

Is this fix enough for existing bad entries or does it still leak through API etc?

#Comment by Aaron Schulz (talk | contribs)   22:11, 19 October 2011

It is not on 1.18 and isn't needed. As it turns out, ipb_by in 1.18 just causes the "blocker" cell in the pager table to be blank.

This doesn't help the API though (known problem).

#Comment by Brion VIBBER (talk | contribs)   22:30, 19 October 2011

If the bug only exists on 1.18 and later, why's it needed on 1.17 at all? For sites that have been switched back from 1.18 to 1.17?

#Comment by Aaron Schulz (talk | contribs)   22:33, 19 October 2011

Meta switched to 1.18 before the others, so it became visible in 1.17 wikis.

In any case, the bad DB rows are still being inserted when blocks happen.

Status & tagging log