Last modified: 2013-05-10 10:24:06 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 T48768, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46768 - "blockedtext" message uses user id instead of username for numerical usernames
"blockedtext" message uses user id instead of username for numerical usernames
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User blocking (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: 1.22.0 release
Assigned To: Kevin Israel (PleaseStand)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-02 03:33 UTC by Mr. Stradivarius
Modified: 2013-05-10 10:24 UTC (History)
5 users (show)

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


Attachments

Description Mr. Stradivarius 2013-04-02 03:33:40 UTC
In MediaWiki messages that display usernames, if the parameter input is numerical, the software assumes that it must be a user id. This breaks the message for users with purely numerical usernames.

This bug came to light after [[User:7]] on the English Wikipedia blocked themselves for April Fools, but the blocking user was displayed as [[User:Joao]] (user id 7). See the following:

https://en.wikipedia.org/wiki/MediaWiki_talk:Blockedtext#.241_variable_is_not_working
https://en.wikipedia.org/wiki/File:Blocked_Media_Wiki_Parameter_Problem.png
Comment 1 MZMcBride 2013-04-02 04:13:18 UTC
Given <https://test.wikipedia.org/w/api.php?action=query&list=allusers&aufrom=Jimbo+Wales&aulimit=1> (<u userid="6295" name="Jimbo Wales" />), I created User:6295 on test.wikipedia.org (using an admin account, as a global blacklist rule prevents strictly numeric usernames...). I blocked the account with my main account (User:MZMcBride) and the post-block success screen, Special:Log/block, Special:BlockList, Special:RecentChanges, and the various log excerpts (at Special:Contributions, etc.) all look fine to me.

Special:Watchlist isn't showing the block of User:6295, but I think that's because the user did not yet have a user page (or possibly because the user account name was numeric...). This is a separate issue that I'll investigate elsewhere.

I made User:6295 an admin on test.wikipedia.org and self-blocked. When I visit <https://test.wikipedia.org/w/index.php?title=Main_Page&action=edit> while logged in as the self-blocked User:6295, I see:

---
You do not have permission to edit this page, for the following reason:
Your account or IP address has been blocked.

The block was made by Jimbo Wales. The reason given is testing.
Start of block: 04:06, 2 April 2013
Expiry of block: infinite
Intended blockee: 6295

You can contact Jimbo Wales or another administrator to discuss the block. You cannot use the 'e-mail this user' feature unless a valid e-mail address is specified in your account preferences and you have not been blocked from using it. Your current IP address is 68.33.116.129, and the block ID is #15060. Please include all above details in any queries you make.
---

Marking this bug as _confirmed_ (new) accordingly. (Hah! An April Fools' prank exposes a legitimate user interface bug.) Where the block message reads "Jimbo Wales", it should read "6295". I'm not sure how many MediaWiki messages are affected.
Comment 2 MZMcBride 2013-04-02 04:29:09 UTC
(In reply to comment #1)
> Special:Watchlist isn't showing the block of User:6295, but I think that's
> because the user did not yet have a user page (or possibly because the user
> account name was numeric...). This is a separate issue that I'll investigate
> elsewhere.

I filed this as bug 46769.

I'm marking this bug (bug 46768) as easy, as it should be a fairly trivial change.
Comment 3 Kevin Israel (PleaseStand) 2013-04-03 23:00:24 UTC
Gerrit change #57436 should cover Title::getUserPermissionsErrors().
Comment 4 Antoine "hashar" Musso (WMF) 2013-04-09 08:21:34 UTC
(In reply to comment #3)
> Gerrit change #57436 should cover Title::getUserPermissionsErrors().

Reverted with https://gerrit.wikimedia.org/r/#/c/58283/ since the patch broke unit tests (see bug 47031)
Comment 5 Gerrit Notification Bot 2013-04-09 16:05:22 UTC
Related URL: https://gerrit.wikimedia.org/r/58308 (Gerrit Change I49d973992a99e03b4e8de112b47b737037a85338)
Comment 6 Kevin Israel (PleaseStand) 2013-05-10 10:24:06 UTC
Should be fixed in 1.22wmf3. Please file separate reports for any similar
issues that are not related to the "blockedtext" and "autoblockedtext"
messages.

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


Navigation
Links