[Pkg-mediawiki-devel] Bug#658672: mediawiki: User::inDnsBlacklist does not reverse the user's IP before checking it against the wgSorbsUrl

Nye Liu nyet at nyet.org
Sun Feb 5 01:31:15 UTC 2012


Package: mediawiki
Version: 1:1.15.5-7
Severity: important
Tags: upstream patch



Dear Maintainer,

wgSorbsUrl doesn't work because inDnsBlacklist is broken. It needs to reverse
the IP address quartet before checking it.

--- mediawiki/includes/User.php-dist	2012-02-04 17:26:12.000000000 -0800
+++ mediawiki/includes/User.php	2012-02-04 17:27:14.000000000 -0800
@@ -1140,7 +1140,8 @@
 		// FIXME: IPv6 ???  (http://bugs.php.net/bug.php?id=33170)
 		if( IP::isIPv4($ip) ) {
 			# Make hostname
-			$host = "$ip.$base";
+			$reverse = join(".", array_reverse(explode('.',$ip)));
+			$host = "$reverse.$base";
 
 			# Send query
 			$ipList = gethostbynamel( $host );

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35.4-rscloud (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages mediawiki depends on:
ii  apache2                      2.2.22-1
ii  apache2-mpm-prefork [httpd]  2.2.22-1
ii  debconf [debconf-2.0]        1.5.39
ii  mime-support                 3.48-1
ii  php5                         5.3.10-1
ii  php5-mysql                   5.3.10-1
ii  php5-sqlite                  5.3.10-1

Versions of packages mediawiki recommends:
ii  mysql-server                     5.1.58-1
ii  mysql-server-5.1 [mysql-server]  5.1.58-1
ii  php5-cli                         5.3.10-1

Versions of packages mediawiki suggests:
ii  clamav          0.97.3+dfsg-1
ii  imagemagick     8:6.6.0.4-3
ii  mediawiki-math  1:1.15.5-7
ii  memcached       1.4.5-1
ii  php5-gd         5.3.10-1

-- debconf information excluded





More information about the Pkg-mediawiki-devel mailing list