Last modified: 2008-08-06 20:55:33 UTC
1. go to the CU log and use the "target" search 2. search for usernames like e.g. "John-Doe" or "A-BCD" 3. it doesn't matter if these specific names actually exist in the log or not, the given result lists _all_ checked accounts that include a hyphen ("-") in their usernames I regard this as a bug, as it makes the current minimal search functionality less useful, at least on wikis/for languages where hyphens are common and numerous such accounts have been checked. In addition please note bug 14699 (allow wildcard search): Of course, a search for only "-" should give such a long output (as it actually does already, don't know why, bug 14699 hasn't been fixed yet), but not a search for a specific username. Thanks in advance for fixing this issue :-)
In CheckUser_body.php: } else /* target */ { $type = 'target'; // Is it an IP? list( $start, $end ) = IP::parseRange( $target ); if ( $start !== false ) { This seems to be the problem -- IP::parseRange() is a bit over-aggressive and is giving some weird false positives for non-IP things: > return IP::parseRange("Blah"); array(2) { [0]=> bool(false) [1]=> bool(false) } > return IP::parseRange("Foo-Bar"); array(2) { [0]=> string(8) "00000000" [1]=> string(8) "00000000" } So probably IP::parseRange() needs to be tightened up to ensure it returns (false, false) when the components are not IPs...
Created attachment 5129 [details] Proposed patch How about this?
Looks good to me! > return IP::parseRange('Foo-Bar'); array(2) { [0]=> bool(false) [1]=> bool(false) } > return IP::parseRange('128.125.1.150-128.125.1.192'); array(2) { [0]=> string(8) "807D0196" [1]=> string(8) "807D01C0" } Applied in r38739 -- thanks for the patch!