Index: trunk/phase3/includes/specials/SpecialIpblocklist.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | function wfSpecialIpblocklist() { |
12 | 12 | global $wgUser, $wgOut, $wgRequest; |
13 | 13 | |
14 | | - $ip = $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) ); |
| 14 | + $ip = trim( $wgRequest->getVal( 'wpUnblockAddress', $wgRequest->getVal( 'ip' ) ) ); |
15 | 15 | $id = $wgRequest->getVal( 'id' ); |
16 | 16 | $reason = $wgRequest->getText( 'wpUnblockReason' ); |
17 | 17 | $action = $wgRequest->getText( 'action' ); |
— | — | @@ -245,10 +245,10 @@ |
246 | 246 | // No extra conditions |
247 | 247 | } elseif ( substr( $this->ip, 0, 1 ) == '#' ) { |
248 | 248 | $conds['ipb_id'] = substr( $this->ip, 1 ); |
249 | | - } elseif ( IP::toUnsigned( $this->ip ) !== false ) { |
| 249 | + } elseif ( IP::isIPAddress($this->ip) && strpos($this->ip,'/') === false ) { |
250 | 250 | $conds['ipb_address'] = IP::sanitizeIP($this->ip); |
251 | 251 | $conds['ipb_auto'] = 0; |
252 | | - } elseif( preg_match( '/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\\/(\\d{1,2})$/', $this->ip, $matches ) ) { |
| 252 | + } elseif( IP::isIPAddress($this->ip) ) { |
253 | 253 | $conds['ipb_address'] = Block::normaliseRange( $this->ip ); |
254 | 254 | $conds['ipb_auto'] = 0; |
255 | 255 | } else { |