Page MenuHomePhabricator

TypeError: Argument 1 passed to MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm::authenticate() must be of the type array, string given
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   TypeError: Argument 1 passed to MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm::authenticate() must be of the type array, string given, called in /srv/mediawiki/php-1.42.0-wmf.5/extensions/WebAuthn/src/HTMLForm/WebAu
error.stack_trace
from /srv/mediawiki/php-1.42.0-wmf.5/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php(101)
#0 /srv/mediawiki/php-1.42.0-wmf.5/extensions/WebAuthn/src/HTMLForm/WebAuthnDisableForm.php(74): MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm->authenticate(string)
#1 /srv/mediawiki/php-1.42.0-wmf.5/includes/htmlform/HTMLForm.php(751): MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm->onSubmit(array, MediaWiki\Extension\WebAuthn\HTMLForm\WebAuthnDisableForm)
#2 /srv/mediawiki/php-1.42.0-wmf.5/includes/htmlform/HTMLForm.php(631): HTMLForm->trySubmit()
#3 /srv/mediawiki/php-1.42.0-wmf.5/includes/htmlform/HTMLForm.php(647): HTMLForm->tryAuthorizedSubmit()
#4 /srv/mediawiki/php-1.42.0-wmf.5/extensions/OATHAuth/src/HTMLForm/OATHAuthOOUIHTMLForm.php(81): HTMLForm->show()
#5 /srv/mediawiki/php-1.42.0-wmf.5/extensions/OATHAuth/src/Special/OATHManage.php(253): MediaWiki\Extension\OATHAuth\HTMLForm\OATHAuthOOUIHTMLForm->show(NULL)
#6 /srv/mediawiki/php-1.42.0-wmf.5/extensions/OATHAuth/src/Special/OATHManage.php(191): MediaWiki\Extension\OATHAuth\Special\OATHManage->addCustomContent(MediaWiki\Extension\WebAuthn\Module\WebAuthn)
#7 /srv/mediawiki/php-1.42.0-wmf.5/extensions/OATHAuth/src/Special/OATHManage.php(103): MediaWiki\Extension\OATHAuth\Special\OATHManage->addModuleHTML(MediaWiki\Extension\WebAuthn\Module\WebAuthn)
#8 /srv/mediawiki/php-1.42.0-wmf.5/includes/specialpage/SpecialPage.php(727): MediaWiki\Extension\OATHAuth\Special\OATHManage->execute(NULL)
#9 /srv/mediawiki/php-1.42.0-wmf.5/includes/specialpage/SpecialPageFactory.php(1637): MediaWiki\SpecialPage\SpecialPage->run(NULL)
#10 /srv/mediawiki/php-1.42.0-wmf.5/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#11 /srv/mediawiki/php-1.42.0-wmf.5/includes/MediaWiki.php(960): MediaWiki->performRequest()
#12 /srv/mediawiki/php-1.42.0-wmf.5/includes/MediaWiki.php(613): MediaWiki->main()
#13 /srv/mediawiki/php-1.42.0-wmf.5/index.php(50): MediaWiki->run()
#14 /srv/mediawiki/php-1.42.0-wmf.5/index.php(46): wfIndexMain()
#15 /srv/mediawiki/w/index.php(3): require(string)
#16 {main}
Impact

6 occurrences in the last 24 hours on enwiki.

Notes

Details

Request URL
https://en.wikipedia.org/wiki/Special:Manage_Two-factor_authentication

Event Timeline

The type-hinting was added with 879dcdf9f7518061d90d753e2de3f3d5e345b6c9 to the disable form.
The manage form does not have this type hint.
Add key has FormatJson::decode call, it seems the documentation and the type hint is wrong.

Change 977294 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/WebAuthn@master] Use string type for WebAuthnDisableForm::authenticate

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

Change 977294 merged by jenkins-bot:

[mediawiki/extensions/WebAuthn@master] Use string type for WebAuthnDisableForm::authenticate

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

Umherirrender claimed this task.