Topic on Project:Support desk

EmailAuthentication broken - token is NULL in user table

12
Summary by Ciencia Al Poder
Mrknowitall3 (talkcontribs)

Hello everyone,

i recently updated to Mediawiki 1.25. Now everything works fine, but EmailAuthentication is broken: When a new user creates an account, he receives his confirmation mail, but the confirmation link leads to an error telling the user the token is invalid or expired.

Looking at the database, i notice that the user_email_token, user_email_token_expires and user_email_authenticated columns of the user table are NULL for the newly registered users.

I set up a wgDebugLogFile in LocalSettings.php and saw the following suspicious lines in the log file when creating a new user:


> [exception] [ad7904a2] /index.php?title=Spezial:Anmelden&action=submitlogin&type=signup&returnto=Spezial:E-Mail+best%C3%A4tigen/142336d3821c94adb52c80a82fb379c0 MWException from line 3658 of /homepages/26/d447883330/htdocs/wiki/includes/User.php: CAS update failed on user_touched for user ID '825'.

> #0 /homepages/26/d447883330/htdocs/wiki/includes/User.php(4165): User->saveSettings()

> #1 /homepages/26/d447883330/htdocs/wiki/includes/specials/SpecialUserlogin.php(409): User->sendConfirmationMail()

> #2 /homepages/26/d447883330/htdocs/wiki/includes/specials/SpecialUserlogin.php(314): LoginForm->addNewAccount()

> #3 /homepages/26/d447883330/htdocs/wiki/includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)

> #4 /homepages/26/d447883330/htdocs/wiki/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)

> #5 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(267): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))

> #6 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(566): MediaWiki->performRequest()

> #7 /homepages/26/d447883330/htdocs/wiki/includes/MediaWiki.php(414): MediaWiki->main()

> #8 /homepages/26/d447883330/htdocs/wiki/index.php(41): MediaWiki->run()

> #9 {main}

> UserMailer::send: sending mail to Testuser3 <******@****.**>

>

Looks like the user is created, but the exception prohibits saving the token and expiry information (at least this is my guess). Can anyone help?

I originally posted this question on the mailing list: https://lists.wikimedia.org/pipermail/mediawiki-l/2015-June/044454.html Other users confirmed the problem: https://lists.wikimedia.org/pipermail/mediawiki-l/2015-June/044455.html

A report on phabricator which was recommended on the list failed due to this problem: https://phabricator.wikimedia.org/T102276

Klortho (talkcontribs)

I'm one of the other users. Thanks, Mrknowitall3, for reporting the problem. Can someone who has a good account set up on Phabricator already help us by reporting this problem there, and putting a link to the bug report back here?

88.130.76.25 (talkcontribs)
AKlapper (WMF) (talkcontribs)
Mrknowitall3 (talkcontribs)
AKlapper (WMF) (talkcontribs)

I am sorry. I missed that part and now I understand what you meant by "good report". This problem will be fixed in about 48 hours.

Klortho (talkcontribs)

This problem occurs on 1.25.0 as well as 1.25.1 (the latest). When I downgraded and installed 1.24.2, it works.

79.197.230.221 (talkcontribs)

Has this problem fixed, yet?

2003:6A:6A17:70B2:A90E:3124:3861:D785 (talkcontribs)

I am still having those problems. I tried to fix the php file manually, but the PhabricatorUser.php seems to have a slightly different structure than our User.php file…

Reply to "EmailAuthentication broken - token is NULL in user table"