r58054 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58053‎ | r58054 | r58055 >
Date:16:44, 23 October 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 21255) Fixed hostname construction for DNSBL checking

Based on a patch by Antonio Ospite - http://bug-attachment.wikimedia.org/attachment.cgi?id=6707
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -59,6 +59,7 @@
6060 == Patch Contributors ==
6161 * Agbad
6262 * Ahmad Sherif
 63+* Antonio Ospite
6364 * Azliq7
6465 * Borislav Manolov
6566 * Brad Jorsch
Index: trunk/phase3/includes/User.php
@@ -1195,8 +1195,11 @@
11961196 $host = '';
11971197 // FIXME: IPv6 ??? (http://bugs.php.net/bug.php?id=33170)
11981198 if( IP::isIPv4( $ip ) ) {
 1199+ # Reverse IP, bug 21255
 1200+ $ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
 1201+
11991202 # Make hostname
1200 - $host = "$ip.$base";
 1203+ $host = "$ipReversed.$base";
12011204
12021205 # Send query
12031206 $ipList = gethostbynamel( $host );
Index: trunk/phase3/RELEASE-NOTES
@@ -589,6 +589,7 @@
590590 * (bug 21234) Moving subpages of titles containing \\ now works properly
591591 * (bug 21006) maintenance/updateArticleCount.php now works again on PostgreSQL
592592 * (bug 19319) Add activeusers-intro message at top of SpecialActiveUsers page
 593+* (bug 21255) Fixed hostname construction for DNSBL checking
593594
594595 == API changes in 1.16 ==
595596

Status & tagging log