Fix ipv6 block searches
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 9 Oct 2008 20:37:40 +0000 (20:37 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 9 Oct 2008 20:37:40 +0000 (20:37 +0000)
includes/specials/SpecialIpblocklist.php

index 242b6cc..9ff59b4 100644 (file)
@@ -246,7 +246,7 @@ class IPUnblockForm {
                } elseif ( substr( $this->ip, 0, 1 ) == '#' ) {
                        $conds['ipb_id'] = substr( $this->ip, 1 );
                } elseif ( IP::toUnsigned( $this->ip ) !== false ) {
-                       $conds['ipb_address'] = $this->ip;
+                       $conds['ipb_address'] = IP::sanitizeIP($this->ip);
                        $conds['ipb_auto'] = 0;
                } elseif( preg_match( '/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\\/(\\d{1,2})$/', $this->ip, $matches ) ) {
                        $conds['ipb_address'] = Block::normaliseRange( $this->ip );