Last modified: 2014-03-20 07:18:10 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 T40894, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38894 - Bad escaping of characters in Titleblacklist-forbidden-new-account when triggered
Bad escaping of characters in Titleblacklist-forbidden-new-account when trigg...
Status: RESOLVED DUPLICATE of bug 44718
Product: MediaWiki extensions
Classification: Unclassified
TitleBlacklist (Other open bugs)
master
All All
: High minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 42228 44120 (view as bug list)
Depends on:
Blocks: messages
  Show dependency treegraph
 
Reported: 2012-07-31 21:38 UTC by James Forrester
Modified: 2014-03-20 07:18 UTC (History)
14 users (show)

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


Attachments
Image of the error on the English Wikipedia (811.05 KB, image/jpeg)
2013-03-16 06:02 UTC, Matthew Bowker
Details

Description James Forrester 2012-07-31 21:38:06 UTC
When trying to create an account on ruwiktionary, I got the following message:

Login error
<<p>The user name "Jdforrester (WMF)" has been banned from creation. It matches the following blacklist entry: <code>.*\(.+\)$ <newaccountonly> # Участник:%username%_(сексуалист)</code> </p>>

Looking at [[MediaWiki:Titleblacklist-forbidden-new-account]] it looks fine, so presumably either the <code> is triggering something odd, or Titleblacklist is calling it wrongly?
Comment 1 James Forrester 2012-07-31 21:39:35 UTC
Of course, I meant https://translatewiki.net/wiki/MediaWiki:Titleblacklist-forbidden-new-account/en rather than the enwiki issue. :-)
Comment 2 Roan Kattouw 2012-07-31 21:57:18 UTC
https://gerrit.wikimedia.org/r/17132 (already deployed as a live hack) seems to fix this.
Comment 3 Roan Kattouw 2012-07-31 22:16:52 UTC
Not actually fixed.

This is because CentralAuth uses the same hook function for AbortNewAccount and AbortAutoAccount. This is a problem because AbortNewAccount expects the returned error to be an HTML string, while AbortAutoAccount expects it to be a message key. The hook outputs an HTML string to both, which causes the latter to interpret the HTML string as a message key, which obviously fails terribly. What's even worse is that docs/hooks.txt claims that both hooks take a message key. Ugh.

The message key approach is inflexible, though, because TitleBlacklist needs to pass parameters to the message (like the rule that triggered the block), so I think a reasonable way to fix this would be to allow the hook to return either a string or a Message object.
Comment 4 Andre Klapper 2013-01-18 18:24:16 UTC
*** Bug 44120 has been marked as a duplicate of this bug. ***
Comment 5 Andre Klapper 2013-01-18 18:24:26 UTC
*** Bug 42228 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Bowker 2013-03-16 06:02:27 UTC
Created attachment 11943 [details]
Image of the error on the English Wikipedia

Just experienced this on the English Wikipedia.  Screenshot attached.
Comment 7 James Forrester 2013-05-05 17:00:14 UTC
Not actually being worked on by Roan; de-assigning. Do we need to create a separate bug for the need for core to be altered?
Comment 8 Matthew Flaschen 2013-05-20 23:52:24 UTC
(In reply to comment #3)
> The message key approach is inflexible, though, because TitleBlacklist needs
> to pass parameters to the message (like the rule that triggered the block), so I
> think a reasonable way to fix this would be to allow the hook to return
> either a string or a Message object.

And if it returns a string, it will be treated as a message key?
Comment 9 Gerrit Notification Bot 2013-05-21 00:42:58 UTC
Related URL: https://gerrit.wikimedia.org/r/64645 (Gerrit Change I0d728a9645644fe95a7a7c680f568b8206e202a4)
Comment 10 MZMcBride 2013-05-21 02:51:40 UTC
(In reply to comment #9)
> Related URL: https://gerrit.wikimedia.org/r/64645 (Gerrit Change
> I0d728a9645644fe95a7a7c680f568b8206e202a4)

This is not accessible for me. Perhaps it's marked as a draft?
Comment 11 Steven Walling 2013-05-21 03:04:48 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Related URL: https://gerrit.wikimedia.org/r/64645 (Gerrit Change
> > I0d728a9645644fe95a7a7c680f568b8206e202a4)
> 
> This is not accessible for me. Perhaps it's marked as a draft?

Yeah it is.
Comment 12 Tyler Romeo 2013-08-02 18:45:57 UTC

*** This bug has been marked as a duplicate of bug 44718 ***
Comment 13 Gerrit Notification Bot 2014-03-20 07:18:10 UTC
Change 64645 abandoned by Krinkle:
(Bug 38894) Abort{New,Auto}Account: error may be Message or HTML.

Reason:
Abandoning for now.

https://gerrit.wikimedia.org/r/64645

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


Navigation
Links