Page MenuHomePhabricator

Exception from line 788 of /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUserlogin.php: Invalid status code returned from AbortLogin hook: 5
Closed, ResolvedPublic

Description

I was trying to login on mobile and temporarily forgot my password, so triggered captcha. I then tried to login on non-mobile and have the captcha there. I then click login (didn't fill out the captcha yet)

I then get an exception:

/w/index.php?title=Special:UserLogin&action=submitlogin&type=login&returnto=Q22   Exception from line 788 of /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUserlogin.php: Invalid status code returned from AbortLogin hook: 5 {"exception_id":"62466231"} 
[Exception Exception] (/srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUserlogin.php:788) Invalid status code returned from AbortLogin hook: 5
  #0 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUserlogin.php(968): LoginForm->authenticateUserData()
  #1 /srv/mediawiki/php-1.27.0-wmf.4/includes/specials/SpecialUserlogin.php(345): LoginForm->processLogin()
  #2 /srv/mediawiki/php-1.27.0-wmf.4/includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)
  #3 /srv/mediawiki/php-1.27.0-wmf.4/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)
  #4 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(248): SpecialPageFactory::executePath(Title, RequestContext)
  #5 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(669): MediaWiki->performRequest()
  #6 /srv/mediawiki/php-1.27.0-wmf.4/includes/MediaWiki.php(474): MediaWiki->main()
  #7 /srv/mediawiki/php-1.27.0-wmf.4/index.php(41): MediaWiki->run()
  #8 /srv/mediawiki/w/index.php(3): include(string)

Event Timeline

aude raised the priority of this task from to High.
aude updated the task description. (Show Details)
aude subscribed.
aude set Security to None.

That mostly just replaces the exception on line 1088.

tgr@terbium:~$ mwscript eval.php --wiki=ptwikivoyage
> var_dump($wgHooks['AbortLogin']);
array(2) {
  [0]=>
  string(34) "ConfirmEditHooks::confirmUserLogin"
  [1]=>
  string(30) "CentralAuthHooks::onAbortLogin"
}

Those both look fine though.

Eh, that's dumb :( Should have been an array key check, not an array value check.

Change 249936 had a related patch set uploaded (by Gergő Tisza):
Fix AbortLogin hook return value check

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

Change 249937 had a related patch set uploaded (by Gergő Tisza):
Fix AbortLogin hook return value check

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

Change 249936 merged by jenkins-bot:
Fix AbortLogin hook return value check

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

Change 249937 merged by jenkins-bot:
Fix AbortLogin hook return value check

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

Tgr claimed this task.

Fixed, deployed.