Page MenuHomePhabricator

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

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.19/includes/user/BotPassword.php(348)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.19/includes/user/BotPassword.php(348)strlen(null)
#2/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiLogin.php(165)MediaWiki\User\BotPassword::canonicalizeLoginData(string, null)
#3/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(2005)MediaWiki\Api\ApiLogin->execute()
#4/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(947)MediaWiki\Api\ApiMain->executeAction()
#5/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(918)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#6/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#7/srv/mediawiki/php-1.44.0-wmf.19/includes/MediaWikiEntryPoint.php(202)MediaWiki\Api\ApiEntryPoint->execute()
#8/srv/mediawiki/php-1.44.0-wmf.19/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#9/srv/mediawiki/w/api.php(3)require(string)
#10{main}
Impact
Notes
Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
FrameLocationCall
from/srv/mediawiki/php-1.44.0-wmf.19/includes/user/BotPassword.php(353)
#0[internal function]MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.44.0-wmf.19/includes/user/BotPassword.php(353)strlen(null)
#2/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiLogin.php(165)MediaWiki\User\BotPassword::canonicalizeLoginData(string, null)
#3/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(2005)MediaWiki\Api\ApiLogin->execute()
#4/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(947)MediaWiki\Api\ApiMain->executeAction()
#5/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiMain.php(918)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#6/srv/mediawiki/php-1.44.0-wmf.19/includes/api/ApiEntryPoint.php(152)MediaWiki\Api\ApiMain->execute()
#7/srv/mediawiki/php-1.44.0-wmf.19/includes/MediaWikiEntryPoint.php(202)MediaWiki\Api\ApiEntryPoint->execute()
#8/srv/mediawiki/php-1.44.0-wmf.19/api.php(44)MediaWiki\MediaWikiEntryPoint->run()
#9/srv/mediawiki/w/api.php(3)require(string)
#10{main}
Impact
Notes

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

The password seems to be null... Isn't the password supposed to be a required parameter?

The password seems to be null... Isn't the password supposed to be a required parameter?

We requirePostedParameters to make sure that they're not GET'ed, but no, getAllowedParams doesn't specify it as required (presumably for some odd edge case where the password is injected by an extension?).

Change #1127140 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Jdforrester-WMF changed the task status from Open to In Progress.Mar 12 2025, 8:28 PM

Change #1127583 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@master] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127140 merged by jenkins-bot:

[mediawiki/core@master] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127591 had a related patch set uploaded (by Reedy; author: Jforrester):

[mediawiki/core@wmf/1.44.0-wmf.20] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127583 merged by jenkins-bot:

[mediawiki/core@master] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127593 had a related patch set uploaded (by Reedy; author: Jforrester):

[mediawiki/core@REL1_43] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127594 had a related patch set uploaded (by Reedy; author: Jforrester):

[mediawiki/core@REL1_42] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127633 had a related patch set uploaded (by Reedy; author: Jforrester):

[mediawiki/core@REL1_39] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127634 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_43] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127635 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_42] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127636 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/core@REL1_39] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127593 merged by jenkins-bot:

[mediawiki/core@REL1_43] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127591 merged by jenkins-bot:

[mediawiki/core@wmf/1.44.0-wmf.20] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127633 merged by jenkins-bot:

[mediawiki/core@REL1_39] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127636 merged by jenkins-bot:

[mediawiki/core@REL1_39] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127634 merged by jenkins-bot:

[mediawiki/core@REL1_43] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Change #1127594 merged by jenkins-bot:

[mediawiki/core@REL1_42] ApiLogin: Don't break BotPasswords if password or user is blank, just error

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

Change #1127635 merged by jenkins-bot:

[mediawiki/core@REL1_42] BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData

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

Reedy assigned this task to Jdforrester-WMF.