Page MenuHomePhabricator

Username validity depends on per-wiki configuration (namespaces, etc.)
Closed, ResolvedPublic

Description

The username WP:BEANS is valid on metawiki, but not enwiki because WP is a namespace alias on enwiki, but not on metawiki.

This doesn't block SULF, just something we'll need to fix eventually.

Event Timeline

Legoktm created this task.May 11 2015, 5:13 PM
Legoktm raised the priority of this task from to Low.
Legoktm updated the task description. (Show Details)
Legoktm added a subscriber: Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 11 2015, 5:13 PM
Legoktm updated the task description. (Show Details)May 11 2015, 5:42 PM
Legoktm set Security to None.

I think that usernames like this should be blocked by titleblacklist at meta, and it becomes a matter of just capturing the terms to protect.

  • WP: / Wikipedia:
  • WS: / Wikisource:
  • Wikt: / Wiktionary
  • WN: / Wikinews:
  • WQ: / Wikiquote
  • C: / Commons:
  • WV: / Wikiversity:
  • Voy: / Wikivoyage:
  • Project:

Please add them here or on [[m:Talk:Blacklist]]

General question, is there value in preventing the colon from being part of a username, though it is probably too late to make such a change. :-(

I think that usernames like this should be blocked by titleblacklist at meta, and it becomes a matter of just capturing the terms to protect.

That won't scale unfortunately. For example, Benutzer:Foo is valid on enwiki, but invalid on dewiki (or any German project). This applies to any localized namespace or whenever interwiki prefixes change.

General question, is there value in preventing the colon from being part of a username, though it is probably too late to make such a change. :-(

That would be the best solution IMO.

Change 210257 had a related patch set uploaded (by Legoktm):
Add ':' to $wgInvalidUsernameCharacters

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

Fair point. So in the reality space

  • How many usernames do we currently have that have colons in the usernames?
  • Will this change just effect new accounts?
  • Is this considered a breaking change?
Glaisher added a subscriber: Glaisher.EditedMay 12 2015, 3:50 AM
  • How many usernames do we currently have that have colons in the usernames?
MariaDB [centralauth_p]> SELECT count(*) FROM `globaluser` WHERE gu_name LIKE '%:%';
+----------+
| count(*) |
+----------+
|    12315 |
+----------+

<legoktm> Glaisher: 12428 accounts actually :)
<legoktm> I guess there are 100ish suppressed accounts with : in their usernames

  • Will this change just effect new accounts?

Yes.

  • Is this considered a breaking change?

Existing accounts are not effected so no, I guess.

The general case of the problem is that a formerly valid username can be made invalid by later events (usually code upgrades). I'm not sure how wise it is to chase individual subcases.

Why are namespace names prevented in usernames in the first place?

Change 210257 merged by jenkins-bot:
Add ':' to $wgInvalidUsernameCharacters

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

Melos added a subscriber: Melos.May 12 2015, 9:03 PM
Legoktm closed this task as Resolved.May 14 2015, 7:49 PM
Legoktm claimed this task.
Legoktm added a project: User-notice.
Legoktm added a subscriber: brion.May 14 2015, 7:52 PM

The general case of the problem is that a formerly valid username can be made invalid by later events (usually code upgrades). I'm not sure how wise it is to chase individual subcases.

Yup, we still have to be wary of code changes. But this means configuration changes shouldn't affect the validity of usernames.

Why are namespace names prevented in usernames in the first place?

git blame points to @brion who committed https://www.mediawiki.org/wiki/Special:Code/MediaWiki/11679.

Keegan moved this task from Doing to Done on the SUL-Finalization board.May 15 2015, 5:16 AM