Last modified: 2008-08-06 20:55:33 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17049, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15049 - searching CU log for usernames with a hyphen gives unspecific results
searching CU log for usernames with a hyphen gives unspecific results
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CheckUser (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Aaron Schulz
http://de.wikipedia.org/wiki/Spezial:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-05 19:26 UTC by bdk
Modified: 2008-08-06 20:55 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed patch (905 bytes, patch)
2008-08-06 20:40 UTC, Max Semenik
Details

Description bdk 2008-08-05 19:26:26 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 :-)
Comment 1 Brion Vibber 2008-08-06 19:49:05 UTC
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...
Comment 2 Max Semenik 2008-08-06 20:40:25 UTC
Created attachment 5129 [details]
Proposed patch

How about this?
Comment 3 Brion Vibber 2008-08-06 20:55:33 UTC
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!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links