Closed
Bug 707697
Opened 13 years ago
Closed 13 years ago
browser ID login should fail gracefully when JSON response is invalid
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
6.4.1
People
(Reporter: kumar, Assigned: robhudson)
Details
handle this gracefully (with adequate logging). This probably requires a patch to django-browserid.
Traceback (most recent call last):
File "/data/www/apps-preview.mozilla.org/zamboni/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/www/apps-preview.mozilla.org/zamboni/apps/amo/decorators.py", line 49, in wrapper
return f(request, *args, **kw)
File "/data/www/apps-preview.mozilla.org/zamboni/apps/users/views.py", line 319, in browserid_login
assertion=request.POST['assertion'])
File "/data/www/apps-preview.mozilla.org/zamboni/apps/users/views.py", line 286, in browserid_authenticate
result = backend.verify(assertion, settings.SITE_URL)
File "/data/www/apps-preview.mozilla.org/zamboni/vendor/src/django-browserid/django_browserid/auth.py", line 65, in verify
'audience': audience
File "/data/www/apps-preview.mozilla.org/zamboni/vendor/src/django-browserid/django_browserid/auth.py", line 57, in _verify_http_request
return json.loads(content)
File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.6/json/decoder.py", line 338, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Assignee | ||
Comment 1•13 years ago
|
||
FYI: I filed a quick patch to wrap this and add logging. I was going to work on a test but didn't get very far, but it was merged over the weekend.
https://github.com/mozilla/django-browserid/commit/3f28659
So we could bump the vendor version and with the logs see what's going on here.
Comment 2•13 years ago
|
||
I think Greg and Allen bumped django-browserid this morning. Does that affect this bug?
Assignee: nobody → chudson
Assignee | ||
Comment 3•13 years ago
|
||
My patch is added after the point at which it was forked. My assumption is we'll eventually get back on the main branch and my patch will show up then. Until then, it's missing. I can close this when that happens.
Assignee | ||
Comment 4•13 years ago
|
||
We got back on the master branch of django-browserid with my logging patch included. I wasn't able to find any logs, but it shouldn't 500 and write a log when this happens now.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → 6.4.1
Comment 5•13 years ago
|
||
I have no STR to verify this. If someone can add it, I'll verify it.
Updated•9 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•