Page MenuHomePhabricator

PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
FrameLocationCall
#1/srv/mediawiki/php-1.45.0-wmf.6/extensions/CentralAuth/includes/User/CentralAuthUser.php(2556)preg_match(string, null)
#2/srv/mediawiki/php-1.45.0-wmf.6/extensions/CentralAuth/includes/User/CentralAuthUser.php(763)MediaWiki\Extension\CentralAuth\User\CentralAuthUser->getPasswordFromString(null, string)
#3/srv/mediawiki/php-1.45.0-wmf.6/extensions/CentralAuth/includes/User/CentralAuthUser.php(3473)MediaWiki\Extension\CentralAuth\User\CentralAuthUser->getPasswordObject()
#4/srv/mediawiki/php-1.45.0-wmf.6/extensions/CentralAuth/includes/CentralAuthPrimaryAuthenticationProvider.php(215)MediaWiki\Extension\CentralAuth\User\CentralAuthUser->hasScrambledPassword()
#5/srv/mediawiki/php-1.45.0-wmf.6/includes/auth/AuthManager.php(521)MediaWiki\Extension\CentralAuth\CentralAuthPrimaryAuthenticationProvider->beginPrimaryAuthentication(array)
#6/srv/mediawiki/php-1.45.0-wmf.6/includes/auth/AuthManager.php(431)MediaWiki\Auth\AuthManager->continueAuthentication(array)
#7/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(408)MediaWiki\Auth\AuthManager->beginAuthentication(array, string)
#8/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(542)MediaWiki\SpecialPage\AuthManagerSpecialPage->performAuthenticationStep(string, array)
#9/srv/mediawiki/php-1.45.0-wmf.6/includes/htmlform/HTMLForm.php(825)MediaWiki\SpecialPage\AuthManagerSpecialPage->handleFormSubmit(array, MediaWiki\HTMLForm\CodexHTMLForm)
#10/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/AuthManagerSpecialPage.php(473)MediaWiki\HTMLForm\HTMLForm->trySubmit()
#11/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/LoginSignupSpecialPage.php(407)MediaWiki\SpecialPage\AuthManagerSpecialPage->trySubmit()
#12/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/SpecialPage.php(732)MediaWiki\SpecialPage\LoginSignupSpecialPage->execute(null)
#13/srv/mediawiki/php-1.45.0-wmf.6/includes/specialpage/SpecialPageFactory.php(1722)MediaWiki\SpecialPage\SpecialPage->run(null)
#14/srv/mediawiki/php-1.45.0-wmf.6/includes/actions/ActionEntryPoint.php(499)MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, MediaWiki\Context\RequestContext)
#15/srv/mediawiki/php-1.45.0-wmf.6/includes/actions/ActionEntryPoint.php(143)MediaWiki\Actions\ActionEntryPoint->performRequest()
#16/srv/mediawiki/php-1.45.0-wmf.6/includes/MediaWikiEntryPoint.php(198)MediaWiki\Actions\ActionEntryPoint->execute()
#17/srv/mediawiki/php-1.45.0-wmf.6/index.php(58)MediaWiki\MediaWikiEntryPoint->run()
#18/srv/mediawiki/w/index.php(3)require(string)
Impact
Notes

Details

Request URL
https://auth.wikimedia.org/*/w/index.php?centralauthLoginToken=*&returnto=*&title=*&useformat=*&usesul3=*
Related Changes in Gerrit:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

CentralAuthUser::getPassword() is documented as always returning a string, but actually when the CentralAuthUser instance represents a user that does not exist centrally, it seems like it'll return null. The error is not directly related to password scrambling but maybe the relevant code path was unreachable before...

Change #1161032 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/CentralAuth@master] Fix password handling for non-existent users

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

Change #1161032 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Fix password handling for non-existent users

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

matmarex subscribed.

Change #1161950 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/CentralAuth@wmf/1.45.0-wmf.6] Fix password handling for non-existent users

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

Change #1161950 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.45.0-wmf.6] Fix password handling for non-existent users

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

Mentioned in SAL (#wikimedia-operations) [2025-06-23T20:14:27Z] <kharlan@deploy1003> Started scap sync-world: Backport for [[gerrit:1162998|Map pre-save RR scores to predefined values (T364705)]], [[gerrit:1161950|Fix password handling for non-existent users (T395372 T397262)]]

Mentioned in SAL (#wikimedia-operations) [2025-06-23T20:38:46Z] <kharlan@deploy1003> kharlan, tgr: Backport for [[gerrit:1162998|Map pre-save RR scores to predefined values (T364705)]], [[gerrit:1161950|Fix password handling for non-existent users (T395372 T397262)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-23T20:58:57Z] <kharlan@deploy1003> Finished scap sync-world: Backport for [[gerrit:1162998|Map pre-save RR scores to predefined values (T364705)]], [[gerrit:1161950|Fix password handling for non-existent users (T395372 T397262)]] (duration: 44m 29s)