Last modified: 2012-05-23 16:38:49 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 T39031, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37031 - OATHAuth breaks API login
OATHAuth breaks API login
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
OATHAuth (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Ryan Lane
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 19:28 UTC by Sam Reed (reedy)
Modified: 2012-05-23 16:38 UTC (History)
2 users (show)

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


Attachments

Description Sam Reed (reedy) 2012-05-22 19:28:27 UTC
With OATHAuth enabled on a wiki (ie labsconsole), it is not possible to login via the API. It is rejected with a wrong password (tried with add-labs-user as below, and also AutoWikiBrowser)

sumanah@formey:~$ sudo add-labs-user --wikiname="Giovanni Luca Ciampaglia" --mail="glciampagl@gmail.com" giovanni 
Traceback (most recent call last):
  File "/usr/local/sbin/add-labs-user", line 37, in <module>
    main()
  File "/usr/local/sbin/add-labs-user", line 34, in main
    site.login(options.wikiname, passwd, domain=scriptconfig.domain)
  File "/usr/lib/pymodules/python2.6/mwclient/client.py", line 341, in login
    raise errors.LoginError(self, login['login'])
mwclient.errors.LoginError: (<Site object '('https', 'labsconsole.wikimedia.org')/w/'>, {u'result': u'WrongPluginPass'})
Comment 1 Sam Reed (reedy) 2012-05-22 19:42:59 UTC
Though, your LDAP extension and its ChainAuth hook seem somewhat suspect..
Comment 2 Ryan Lane 2012-05-22 22:30:14 UTC
Occasionally the add-labs-user script fails. This happened before OATHAuth. Did you try running that more than once?

OATHAuth will only cause auth to fail if OAUTHAuth is enabled and verified for an account. Nothing in the authentication chain causes this to occur, you can only do so via the special page.

In fact, I just ran that command again, and it went through fine. Whenever you get that error, simply try again.
Comment 3 Sumana Harihareswara 2012-05-23 03:12:04 UTC
No, I hadn't tried running the script again.  Of course I think it would be optimal to fix it more robustly but that's in utopia. :-)  In the future I'll just try running the script again.
Comment 4 Ryan Lane 2012-05-23 05:48:01 UTC
The error almost never occurs, and it's likely a timing issue of some variety. In the long term we don't plan using the script anyway. It's a waste of time to fix.
Comment 5 Sam Reed (reedy) 2012-05-23 08:39:05 UTC
(In reply to comment #4)
> The error almost never occurs, and it's likely a timing issue of some variety.
> In the long term we don't plan using the script anyway. It's a waste of time to
> fix.

So what you're saying is that Sumana is "lucky"? ;)
Comment 6 Ryan Lane 2012-05-23 16:38:49 UTC
Yes. She also likely runs it the most.

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


Navigation
Links