ApiLogin: Don't break BotPasswords if password or user is blank, just error
Bug: T388255 Change-Id: Ibcc20d345cfe7b9410187a74f79f66c8e2326f2f (cherry picked from commit 953ec56fa2c053fee514468e5710f706ee7c200c)
This commit is contained in:
parent
784b9c4dc4
commit
68329e412d
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ class ApiLogin extends ApiBase {
|
|||
|
||||
// Try bot passwords
|
||||
if ( $authRes === false && $this->getConfig()->get( MainConfigNames::EnableBotPasswords ) ) {
|
||||
$botLoginData = BotPassword::canonicalizeLoginData( $params['name'], $params['password'] );
|
||||
$botLoginData = BotPassword::canonicalizeLoginData( $params['name'] ?? '', $params['password'] ?? '' );
|
||||
if ( $botLoginData ) {
|
||||
$status = BotPassword::login(
|
||||
$botLoginData[0], $botLoginData[1], $this->getRequest()
|
||||
|
|
|
|||
Loading…
Reference in a new issue