Index: trunk/phase3/includes/Block.php |
— | — | @@ -455,14 +455,16 @@ |
456 | 456 | $wlEntry = substr($line, 1); |
457 | 457 | $wlEntry = trim($wlEntry); |
458 | 458 | |
459 | | - wfDebug("Checking $wlEntry\n"); |
| 459 | + wfDebug("Checking $ip against $wlEntry..."); |
460 | 460 | |
461 | 461 | # Is the IP in this range? |
462 | 462 | if (IP::isInRange( $ip, $wlEntry )) { |
463 | | - wfDebug("IP $ip matches $wlEntry, not autoblocking\n"); |
| 463 | + wfDebug(" IP $ip matches $wlEntry, not autoblocking\n"); |
464 | 464 | #$autoblockip = null; # Don't autoblock a whitelisted IP. |
465 | 465 | return; #This /SHOULD/ introduce a dummy block - but |
466 | 466 | # I don't know a safe way to do so. -werdna |
| 467 | + } else { |
| 468 | + wfDebug( " No match\n" ); |
467 | 469 | } |
468 | 470 | } |
469 | 471 | |
Index: trunk/phase3/includes/IP.php |
— | — | @@ -223,6 +223,9 @@ |
224 | 224 | $unsignedIP = IP::toUnsigned($addr); |
225 | 225 | list( $start, $end ) = IP::parseRange($range); |
226 | 226 | |
| 227 | + $start = hexdec($start); |
| 228 | + $end = hexdec($end); |
| 229 | + |
227 | 230 | return (($unsignedIP >= $start) && ($unsignedIP <= $end)); |
228 | 231 | } |
229 | 232 | |