Page MenuHomePhabricator

mwoauth is broken
Closed, ResolvedPublic

Description

Got this in wikilabels:

Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: 2017-02-11 07:20:18,167 ERROR:wikilabels -- Exception on /auth/callback/ [GET]
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: Traceback (most recent call last):
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: response = self.full_dispatch_request()
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: rv = self.handle_user_exception(e)
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: reraise(exc_type, exc_value, tb)
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: raise value
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: rv = self.dispatch_request()
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: return self.view_functions[rule.endpoint](**req.view_args)
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "./wikilabels/wsgi/routes/auth.py", line 50, in auth_callback
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: str(request.query_string, 'ascii'))
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/mwoauth/handshaker.py", line 90, in complete
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: self.mw_uri, self.consumer_token, request_token, response_qs)
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: File "/srv/wikilabels/venv/lib/python3.4/site-packages/mwoauth/functions.py", line 144, in complete
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: "something else instead: {0}".format(str(response_qs)))
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: Exception: Expected URL query string containing, but got something else instead: oauth_verifier=<verifier removed>&oauth_token=<token removed>
Feb 11 07:20:18 wikilabels-01 uwsgi-wikilabels-web[13132]: [pid: 13144|app: 0|req: 9682/32251] 10.68.21.68 () {42 vars in 1016 bytes} [Sat Feb 11 07:20:18 2017] GET /auth/callback/?oauth_verifier=<verifier removed>&oauth_token=<token removed> => generated 291 bytes in 6 msecs (HTTP/1.1 500) 2 headers in 84 bytes (1 switches on core 0)

It seems that behavior of OAuth has changed and mwoauth hasn't caought up

Event Timeline

Right now, no one can does OAuth handshake. Bumping it to UBN!

Ladsgroup triaged this task as Unbreak Now! priority.Feb 11 2017, 7:39 AM

Tested locally with OAuth master and mwoauth master and it worked fine.

Thanks for catching this issue. I've just released 0.2.10 with your fixes. Thanks.

Halfak claimed this task.
Halfak moved this task from Backlog to Completed on the Machine-Learning-Team (Active Tasks) board.