Last modified: 2011-04-30 01:16:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22233, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20233 - ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal trivial (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-14 05:25 UTC by Laurence 'GreenReaper' Parry
Modified: 2011-04-30 01:16 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Laurence 'GreenReaper' Parry 2009-08-14 05:25:11 UTC
If the API is used to attempt to login, but the password used to do so is a temporary reset password, $loginForm->authenticateUserData() will return LoginForm :: RESET_PASS. The API does not handle this and falls through to the default case, returning an error. 

I would expect it to return a specific failure code that would indicate the use of a reset password, as suggested by the comments in SpecialUserlogin.php:

// At this point we just return an appropriate code indicating
// that the UI should show a password reset form; bot inter-
// faces etc will probably just fail cleanly here.

If it does not return a new value, it could return WrongPass, since it is not the right (normal) password.

(Yes, I actually got this one, testing MediaWikiAuth.)
Comment 1 Bryan Tong Minh 2009-08-25 19:52:24 UTC
I think we should just silently reject temporary passwords as wrong passwords, i.e. add LoginForm::RESET_PASS as fall through to LoginForm::WRONG_PASS.
Comment 2 Sam Reed (reedy) 2010-01-06 13:45:54 UTC
Fixed as per Bryan and SpecialUserlogin comment. r60729

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links