[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

Mark A. Hershberger m...@everybody.org changed:

   What|Removed |Added

   Priority|Unprioritized   |High
 CC||m...@everybody.org

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

Brion Vibber br...@wikimedia.org changed:

   What|Removed |Added

 AssignedTo|jschulz_4...@msn.com|br...@wikimedia.org

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-24 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

Brion Vibber br...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #9 from Brion Vibber br...@wikimedia.org 2011-05-24 21:05:16 UTC 
---
Done on trunk in r88750:

* (bug 29116) Fix regression breaking CheckUser extension

Fixes regression from r84475 and friends which made Block-load() and its new
front-end Block::newFromTarget() fail when an empty string was passed in as the
IP / $vagueTarget parameter to indicate skipping IP-based lookups.
Added phpunit test cases to confirm that both Block-load() and
Block::newFromTarget() work when given null (already ok), '' (as done from
CheckUser), or false (not seen, but perfectly legit sounding).
Adjusted comparisons to work as expected.

Presumably needs merge to 1.18.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

Owltom accnospam...@yahoo.de changed:

   What|Removed |Added

Summary|CheckUser broken in MW 1.18 |CheckUser broken in MW 1.18
   ||and MW1.19svn

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

Bawolff bawolff...@gmail.com changed:

   What|Removed |Added

 CC||bawolff...@gmail.com,
   ||happy.melon.w...@gmail.com

--- Comment #1 from Bawolff bawolff...@gmail.com 2011-05-23 18:24:01 UTC ---
Maybe caused by r84475 - not 100% sure.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #2 from Bawolff bawolff...@gmail.com 2011-05-23 21:23:24 UTC ---
Owltom: Happy-melon might have fixed this r88664 (if my theory about what is
causing this is correct, however it might be unrelated), can you check if this
is still present on latest trunk?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #3 from Owltom accnospam...@yahoo.de 2011-05-23 23:29:47 UTC ---
Bug still present.

It is (and was) possible to check Edits from pure IPs (IPs not used by user
accounts).

When I check IPs from user accounts, I get

Tried to load block with invalid type (like in Description above)


While checking edits of different IPs, I also ran into There is no user by the
name xxx.xxx.xxx.xxx. Check your spelling. (Checkuser interpreted a correct
IP as an user name, but I cannot reproduce how to trigger this).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #4 from Owltom accnospam...@yahoo.de 2011-05-23 23:32:46 UTC ---
Just noticed Brions r88702 ...

I'll test again ...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #5 from Reedy s...@reedyboy.net 2011-05-23 23:33:49 UTC ---
That's indifferent. I broke that earlier tonight

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #6 from Brion Vibber br...@wikimedia.org 2011-05-23 23:59:14 UTC 
---
With trunk r88704 in so other stuff doesn't break ;) I seem to be ok on
user-IP lookups, I still get the bug reported here when I do IP-edit lookups:

Tried to load block with invalid type

Backtrace:

#0 /var/www/trunk/includes/Block.php(988): Block-newLoad('')
#1 /var/www/trunk/extensions/CheckUser/CheckUser_body.php(1086):
Block::newFromTarget(Object(User), '', false)
#2 /var/www/trunk/extensions/CheckUser/CheckUser_body.php(1161):
CheckUser-userBlockFlags('', '1', Object(User))
#3 /var/www/trunk/extensions/CheckUser/CheckUser_body.php(678):
CheckUser-CUChangesLine(Object(stdClass), '')
#4 /var/www/trunk/extensions/CheckUser/CheckUser_body.php(103):
CheckUser-doIPEditsRequest('192.168.38.113', false, '', 0)
#5 /var/www/trunk/includes/SpecialPageFactory.php(459):
CheckUser-execute(NULL)
#6 /var/www/trunk/includes/Wiki.php(217):
SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#7 /var/www/trunk/includes/Wiki.php(62): MediaWiki-handleSpecialCases()
#8 /var/www/trunk/index.php(141): MediaWiki-performRequestForTitle(NULL)
#9 /var/www/trunk/index.php(69): wfIndexMain()
#10 {main}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #8 from Brion Vibber br...@wikimedia.org 2011-05-24 00:10:12 UTC 
---
So this seems to fail because r84475 makes new assumptions about input data:
the $vagueTarget parameter given to Block::newLoad is '', which is !== null and
therefore gets divided up for further processing.

This expands through self::parseTarget() to a ($target, $type) of (null, null),
which results in the exception being thrown.


$vagueTarget here is... the second parameter passed to Block::newFromTarget().
Callers expect to pass empty strings as empty here, but the code now requires
null:


CheckUser_body.php:

# Check if this user or IP is blocked. If so, give a link to the block
log...
$ip = IP::isIPAddress( $name ) ? $name : '';
$flags = $this-userBlockFlags( $ip, $users_ids[$name], $user );
...
$block = Block::newFromTarget( $user, $ip, false );
...

Block.php:
if( $block-newLoad( $vagueTarget ) ){
...
if( $vagueTarget !== null ){
list( $target, $type ) = self::parseTarget( $vagueTarget );
switch( $type ) {
...
default:
throw new MWException( Tried to load block with invalid type );

Block::newLoad and friends should probably be fixed to accept empty string
values as empty, as existing callers expect.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 29116] CheckUser broken in MW 1.18 and MW1.19svn

2011-05-23 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=29116

--- Comment #7 from Owltom accnospam...@yahoo.de 2011-05-24 00:06:36 UTC ---
(In reply to comment #6)
 With trunk r88704 in so other stuff doesn't break ;) I seem to be ok on
 user-IP lookups

That's what I meant in my first description, Get IP addresses was ok all the
time ...

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l