Last modified: 2013-08-11 10:35:00 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 T49278, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47278 - LoginForm returns "wrongpassword" instead of something sensible when the username/password is correct, but no domain is provided
LoginForm returns "wrongpassword" instead of something sensible when the user...
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.22.0
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-16 06:18 UTC by Kunal Mehta (Legoktm)
Modified: 2013-08-11 10:35 UTC (History)
11 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-04-16 06:18:21 UTC
I've tried with multiple python libraries to log into my account via api.php and failed. (index.php works just fine)

It returns an error of "WrongPass" when I'm 100% sure my password is correct.

These libraries (wikitools, pywikipedia) work fine on other wikis running the same MediaWiki version, so it has to be something in wikitech's setup, maybe an extension.

The first step (getting the token) works fine to the best of my knowledge.
Comment 1 Ryan Lane 2013-04-16 07:18:12 UTC
You also have to pass the domain parameter, which is: labs
Comment 2 Alex Monk 2013-04-16 17:16:33 UTC
Isn't it possible to remove that requirement when there's only one possible value?
Comment 3 MZMcBride 2013-04-17 03:18:28 UTC
(In reply to comment #1)
> You also have to pass the domain parameter, which is: labs

How would anyone know to do this? Re-opening this for now as the current behavior here is ghastly.

Here's what the API returns for a _valid username and password_ when the hidden requirement for a domain is not met:

---
{u'login': {u'result': u'WrongPass'}}
---

The response here doesn't make any sense. If the response were u'result': u'YouNeedToSpecifyADomainForThisWiki', it would make a lot more sense (or at least it would provide a much better clue to the user what's going wrong).

I'm not sure if this is a bug in MediaWiki core (i.e., the MediaWiki API) or in a particular MediaWiki extension (LDAP?). This definitely seems like a bug, though.
Comment 4 Brad Jorsch 2013-04-17 16:05:25 UTC
The API just forwards the error returned by LoginForm.

Reassigning this to "User login" since the problem is that LoginForm returns "wrongpassword" rather than something more sensible for this situation.
Comment 5 MZMcBride 2013-04-17 23:19:51 UTC
Bug subject changed:

old: Unable to log in with api.php on wikitech.wikimedia.org

new: LoginForm returns "wrongpassword" instead of something sensible when the username/password is correct, but no domain is provided

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


Navigation
Links