Page MenuHomePhabricator

centralauth block failed with <centralauth-admin-lock-nonexistent>
Closed, ResolvedPublic

Description

I tried to block https://meta.wikimedia.org/wiki/Special:CentralAuth/CasieBarak6 about a minute before @M7 did it, but failed with the message: <centralauth-admin-lock-nonexistent>

Event Timeline

Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya subscribed.
Glaisher subscribed.

Looks like that message was added when locking was implemented but it got removed after somehow rECAUa996b1f977adfdb721c7d98fab1a37f120bc1a32

centralauth-state-mismatch should have appeared instead.

What happened here was, it only detected the conflict only after trying to update the db after even going through the pre-check of whether the account was locked. In the case of centralauth-state-mismatch, it's before attempting to update the db.

It was removed in https://www.mediawiki.org/wiki/Special:Code/MediaWiki/47919. Apparently it was only noticed that centralauth-admin-unhide-nonexistent was still in use then. I think we should change this one to also use state-mismatch message as a non-existent global account to reach adminLock() and adminUnlock() is very unlikely when compared to race conditions like this.

Change 239567 had a related patch set uploaded (by Glaisher):
Use 'centralauth-state-mismatch' message in adminLock() and adminUnlock()

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

Change 239567 merged by jenkins-bot:
Use 'centralauth-state-mismatch' message in adminLock() and adminUnlock()

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

Glaisher claimed this task.