See T194204.
Its a problem with spoofing usernames, as well as people loading JS from old usernames.
Sometimes its important to create such accounts, so its important to be able to override (which antispoof already supports)
| Bawolff | |
| Jun 4 2018, 4:16 PM |
| F75881757: 0001-Prevent-username-registration-if-the-username-previo.patch | |
| Apr 13 2026, 9:27 PM |
| F75881738: 0001-Prevent-username-registration-if-the-username-previo.patch | |
| Apr 13 2026, 9:27 PM |
See T194204.
Its a problem with spoofing usernames, as well as people loading JS from old usernames.
Sometimes its important to create such accounts, so its important to be able to override (which antispoof already supports)
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Restricted Task | |||||
| Resolved | matmarex | T321482 AntiSpoof shows a nonsensical message for renamed usernames | |||
| Resolved | matmarex | T209760 More specific error messages when user rename fails AntiSpoof | |||
| Resolved | matmarex | T183212 Javascript and CSS pages redirected after rename can be taken over by a newly registered user with the old name | |||
| Resolved | matmarex | T196386 MediaWiki should prevent username registration if the username previously existed |
This got deployed.
It was pointed out the solution only works for renames after 2014. Special:log/renameuser goes back earlier than that, but its hard to use as its not unified, and log_title becomes messed up by later renames.
Leaving this open for now, well we figure out if we have to do anything related to mediawiki security release for this task.
See 867b0d77945635093416f51966b83327c24b7af6
Perhaps we need to also do something for plain ol' fashioned non-CA user renames.
A similar patch should be made in either Renameuser or AntiSpoof for normal non-CA renames since most people don't use CA. I'm removing this as a security release blocker since this doesn't affect any tarball bundled functionality.
Correction: It works but only for registering new users and not any other anti-spoof functionality.
Since this task was filed, the Renameuser extension has been merged into core (T27482), so I think core is now a better place to put this feature than AntiSpoof. It also makes the implementation simpler.
I've been working on a patch, but I wonder, perhaps it could be submitted publicly to Gerrit. This task has been open for 8 years now, with a workaround patch merged in CentralAuth (439496), and has been discussed in other public tasks (e.g. T321482).
Could we make this task public as well? (CC @sbassett)
Proposed patches (I will submit to Gerrit instead if this task becomes public):
| core | |
| CentralAuth | |
This will also fix T364330 and T321482.
Change #1271055 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/core@master] Prevent username registration if the username previously existed
Change #1271058 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/extensions/CentralAuth@master] Prevent username registration if the username previously existed (v2)
Change #1271055 merged by jenkins-bot:
[mediawiki/core@master] Prevent username registration if the username previously existed
Change #1271058 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Prevent username registration if the username previously existed (v2)
@Nemoralis hello, I am responding to the usernotice tag :)
How should this update be worded for Tech News?
I'm not sure if User-notice in Tech News is necessary here, as this is not a significant change for Wikimedia wikis – reusing previously renamed usernames was already disallowed since @Bawolff's first patch on this task in 2018 (T196386#4410039). My changes only improve the error messages you get if you try, and clarify the interface for overriding this limitation (available to sysops, account creators, stewards etc.). I'd be happy to write one if you think it's valuable (@Nemoralis @STei-WMF).
Maybe I should add a release note for MediaWiki 1.47 though, since this will be something new for third-party users (assuming they don't use CentralAuth).
I should also grant the new right to override this to some of the groups which currently have the override-antispoof right (local and global).
Change #1285444 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/core@master] RenameUser: Treat "previously-renamed-account" as a warning, not error
Change #1285445 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/core@master] Add release note about account creation with renamed usernames
Change #1285448 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[operations/mediawiki-config@master] Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes
I'll schedule the config changes for Monday (and also backports of the patches, to avoid confusing appearance of user rights): https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20260511T1300
Change #1285460 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/core@wmf/1.47.0-wmf.1] Prevent username registration if the username previously existed
Change #1285461 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):
[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.1] Prevent username registration if the username previously existed (v2)
Change #1285460 merged by jenkins-bot:
[mediawiki/core@wmf/1.47.0-wmf.1] Prevent username registration if the username previously existed
Change #1285461 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.1] Prevent username registration if the username previously existed (v2)
Mentioned in SAL (#wikimedia-operations) [2026-05-11T13:38:44Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1285460|Prevent username registration if the username previously existed (T196386)]], [[gerrit:1285461|Prevent username registration if the username previously existed (v2) (T196386)]], [[gerrit:1285462|API: Introduce list=globalusers (T261752)]], [[gerrit:1285761|list=globalusers: Avoid querying group permissions with empty group list (T
Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:04:32Z] <lucaswerkmeister-wmde@deploy1003> matmarex, lucaswerkmeister-wmde: Backport for [[gerrit:1285460|Prevent username registration if the username previously existed (T196386)]], [[gerrit:1285461|Prevent username registration if the username previously existed (v2) (T196386)]], [[gerrit:1285462|API: Introduce list=globalusers (T261752)]], [[gerrit:1285761|list=globalusers: Avoid querying group permissions with empty group
Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:18:07Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1285460|Prevent username registration if the username previously existed (T196386)]], [[gerrit:1285461|Prevent username registration if the username previously existed (v2) (T196386)]], [[gerrit:1285462|API: Introduce list=globalusers (T261752)]], [[gerrit:1285761|list=globalusers: Avoid querying group permissions with empty group list (
Change #1285448 merged by jenkins-bot:
[operations/mediawiki-config@master] Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes
Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:20:38Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now (T425785)]]
Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:26:18Z] <lucaswerkmeister-wmde@deploy1003> lucaswerkmeister-wmde, jforrester, matmarex, sfaci: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now
Mentioned in SAL (#wikimedia-operations) [2026-05-11T14:39:28Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1285448|Grant 'createpreviouslyrenamedaccount' to account creators and sysop-likes (T196386)]], [[gerrit:1278704|WikiLambdaApi: update stream configuration (T415254)]], [[gerrit:1285352|WikiLambdaApi instrument: Sets the custom schemaID (T415254)]], [[gerrit:1285406|editSaves: getExperiment returns a promise now (T425785)]] (duration: 18
Change #1285444 merged by jenkins-bot:
[mediawiki/core@master] RenameUser: Treat "previously-renamed-account" as a warning, not error
Change #1285445 merged by jenkins-bot:
[mediawiki/core@master] Add release note about account creation with renamed usernames