Page MenuHomePhabricator

Login error message for blacklisted user autocreation shows markup
Closed, ResolvedPublic

Description

Screenshot of a broken error message

When TitleBlacklist blocks creation of a new user account, the error message is now correctly parsed and displayed (see bug 41242). However, if it blocks autocreation of a local user account, the message is broken. See the attached screenshot.

The problem is that while the AbortNewAccount hook (see http://www.mediawiki.org/wiki/Manual:Hooks/AbortNewAccount) returns the error _message text_, the AbortAutoAccount hook (http://www.mediawiki.org/wiki/Manual:Hooks/AbortAutoAccount) returns the error _message name_. But both hooks are implemented with TitleBlacklistHooks::abortNewAccount which currently returns the error message text, so that AbortNewAccount works, while AbortAutoAccount does not. (Note the extra angle brackets on the screenshot: the resulting _message_ is used as a message name.)

The simple solution of separating the hook implementation into a new abortAutoAccount method and leaving the wfMessage call just in abortNewAccount is probably not acceptable, because AbortAutoAccount would result in a message without the $1 and $2 parameters. Either a new nonspecific parameterless message would need to be used in this case or the whole AbortNewAccount hook would need to be redesigned.


Version: unspecified
Severity: minor

Attached:

BrokenAutoAccountMessage.jpg (328×1 px, 83 KB)

Details

Reference
bz42228

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:13 AM
bzimport added a project: TitleBlacklist.
bzimport set Reference to bz42228.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for taking the time to report this!

That string is https://en.wikipedia.org/wiki/MediaWiki:Titleblacklist-forbidden-new-account and hence a duplicate of bug 38894.

  • This bug has been marked as a duplicate of bug 38894 ***