Last modified: 2013-08-11 10:35:00 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.
You also have to pass the domain parameter, which is: labs
Isn't it possible to remove that requirement when there's only one possible value?
(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.
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.
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