Page MenuHomePhabricator

Disabling two-factor authentication is broken
Closed, ResolvedPublicBUG REPORT

Description

nahidunlimited@mwmaint2002:~$ mwscript extensions/OATHAuth/maintenance/disableOATHAuthForUser.php --wiki=metawiki <x>

Instead of disabling the 2FA of the user, running the above script gives me the following error,

Wikimedia\Services\NoSuchServiceException from line 431 of /srv/mediawiki/php-1.42.0-wmf.12/vendor/wikimedia/services/src/ServiceContainer.php: No such service: OATHAuthUserRepository
#0 /srv/mediawiki/php-1.42.0-wmf.12/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService('OATHAuthUserRep...')
#1 /srv/mediawiki/php-1.42.0-wmf.12/includes/MediaWikiServices.php(351): Wikimedia\Services\ServiceContainer->getService('OATHAuthUserRep...')
#2 /srv/mediawiki/php-1.42.0-wmf.12/extensions/OATHAuth/src/OATHAuthServices.php(62): MediaWiki\MediaWikiServices->getService('OATHAuthUserRep...')
#3 /srv/mediawiki/php-1.42.0-wmf.12/extensions/OATHAuth/maintenance/disableOATHAuthForUser.php(31): MediaWiki\Extension\OATHAuth\OATHAuthServices->getUserRepository()
#4 /srv/mediawiki/php-1.42.0-wmf.12/maintenance/includes/MaintenanceRunner.php(703): DisableOATHAuthForUser->execute()
#5 /srv/mediawiki/php-1.42.0-wmf.12/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#6 /srv/mediawiki/multiversion/MWScript.php(158): require_once('/srv/mediawiki/...')
#7 {main}

Then I tried using the special page on Meta, https://meta.wikimedia.org/wiki/Special:DisableOATHForUser. This too was showing the following error,

[03952002-1314-4556-8007-af0799a881ae] 2024-01-08 06:11:14: Fatal exception of type "Error"

Looks like a similar error also occurred on this user's end: T354492

Event Timeline

Change 988213 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/OATHAuth@master] Fix disabling two-factor authentication

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

taavi triaged this task as High priority.
taavi added a project: Regression.

Change 988413 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/OATHAuth@master] OATHAuthServices: Fix service name

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

Change 988413 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] OATHAuthServices: Fix service name

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

Change 988213 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@master] Fix disabling two-factor authentication

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

Change 988252 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/OATHAuth@wmf/1.42.0-wmf.12] OATHAuthServices: Fix service name

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

Change 988253 had a related patch set uploaded (by Majavah; author: Majavah):

[mediawiki/extensions/OATHAuth@wmf/1.42.0-wmf.12] Fix disabling two-factor authentication

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

taavi renamed this task from OATHAuth's disableOATHAuthForUser.php script issue to Disabling two-factor authentication is broken.Jan 8 2024, 11:26 AM

Change 988252 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@wmf/1.42.0-wmf.12] OATHAuthServices: Fix service name

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

Change 988253 merged by jenkins-bot:

[mediawiki/extensions/OATHAuth@wmf/1.42.0-wmf.12] Fix disabling two-factor authentication

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

Mentioned in SAL (#wikimedia-operations) [2024-01-08T11:36:31Z] <taavi@deploy2002> Started scap: Backport for [[gerrit:988252|OATHAuthServices: Fix service name (T354505)]], [[gerrit:988253|Fix disabling two-factor authentication (T354505)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-08T11:38:02Z] <taavi@deploy2002> taavi: Backport for [[gerrit:988252|OATHAuthServices: Fix service name (T354505)]], [[gerrit:988253|Fix disabling two-factor authentication (T354505)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-08T11:45:52Z] <taavi@deploy2002> Finished scap: Backport for [[gerrit:988252|OATHAuthServices: Fix service name (T354505)]], [[gerrit:988253|Fix disabling two-factor authentication (T354505)]] (duration: 09m 21s)