Page MenuHomePhabricator

Incorrect parameters for MediaWiki:Blockedtext
Closed, ResolvedPublic

Description

Author: petarpetrov.wikimedia

Description:
Let admin A block user account B for 24 hours (autoblock disabled, account creation blocked, if that matters).

Let user B log in and try to edit a page. The URL is

http://some.wikipedia.org/w/index.php?title=Some_page&action=edit

User B gets the [[MediaWiki:Blockedtext]] message:

Your user name or IP address has been blocked.
The block was made by A. The reason given is ''some reason here''.

Start of block: 13:43, 27 May 2008
Expiry of block: 13:43, 28 May 2008
Intended blockee: B
You can contact A 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 1.2.3.4, and the block ID is #567. Please include either or both of these in any queries.

  • Everything looks fine.

The problem is when User B tries to edit a specific page version:

http://some.wikipedia.org/w/index.php?title=Some_page&action=edit&oldid=1690914

The MediaWiki:Blockedtext message is used but some of the message parameter values are not provided correctly:

Your user name or IP address has been blocked.
The block was made by A. The reason given is ''some reason here''.

Start of block: 14:23, 27 May 2008
Expiry of block: 14:23, 27 May 2008
Intended blockee:
You can contact A 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 1.2.3.4, and the block ID is #. Please include either or both of these in any queries.

  • Parameters $5 (block ID) and %7 (intended blockee) are missing (empty)
  • Parameter $6 (block expire time) is incorrectly set to $8 (block start time).

For the '''Blockedtext''' message see http://translatewiki.net/wiki/MediaWiki:Blockedtext

See user screenshot at http://bg.wikipedia.org/wiki/Image:WikiBugpng.png (Bulgarian UI).


Version: 1.13.x
Severity: normal

Details

Reference
bz14295

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:15 PM
bzimport set Reference to bz14295.
bzimport added a subscriber: Unknown Object (MLST).

Nice catch! Actually, nine notices are also shown about calling non-objects etc. I'll try to fix it.

I figured that when a special revision id is given in the edit page url, $user on line 1065 of Title.php will be an instance of StubUser, while when no rev id is given, it is an instance of User. I didn't have time to trace it back and figure where this change occurs; I thought I'd write it here so another dev can follow it.

Looks like someone has fixed this bug without marking it as FIXED.

Fixed by VasilievVV in r35930