Closed
Bug 553397
Opened 15 years ago
Closed 15 years ago
cake_sessions can contain bad data. don't crash
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
5.10
People
(Reporter: jbalogh, Assigned: clouserw)
References
Details
(Whiteboard: [z][stabby][need:livepages][patch][qa-])
Attachments
(1 file)
2.15 KB,
patch
|
davedash
:
review+
|
Details | Diff | Splinter Review |
We're trying to load the user data from the serialized php array. We should probably remove the bad row from the sessions table. That'll force the user to be logged out, but hopefully they'll be able to log in successfully later.
Traceback (most recent call last):
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 80, in get_response
response = middleware_method(request)
File "/data/amo_python/www/preview/zamboni/apps/cake/middleware.py", line 32, in process_request
user = auth.authenticate(session=session)
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/django/contrib/auth/__init__.py", line 50, in authenticate
user = backend.authenticate(**credentials)
File "/data/amo_python/www/preview/zamboni/apps/cake/backends.py", line 24, in authenticate
php_user = phpserialize.loads(serialized_data)
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 457, in loads
object_hook, array_hook)
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 448, in load
return _unserialize()
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 435, in _unserialize
return array_hook(_load_array())
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 401, in _load_array
item = _unserialize()
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 428, in _unserialize
_expect('"')
File "/data/virtualenvs_preview/zamboni/lib/python2.6/site-packages/phpserialize.py", line 382, in _expect
raise ValueError('failed expectation, expected %r got %r' % (e, v))
ValueError: failed expectation, expected '"' got u';'
Reporter | ||
Comment 2•15 years ago
|
||
(Quoth clouserw in bug 557518 comment 0)
> This is a lower priority than the other 5.9 bugs
I think this should be a high priority since we're crashing here. But since this is the first time we're seeing the crash from the API, I guess not too many people are affected.
We could force people with AMOv3 cookies to remora through Zeus if we need a quick fix.
Assignee | ||
Updated•15 years ago
|
Target Milestone: --- → 5.10
Assignee | ||
Comment 3•15 years ago
|
||
We've seen this twice total and I don't know it would happen, but it's not something worth spending a lot of time on. Here's a patch that catches it.
Assignee: nobody → clouserw
Attachment #438155 -
Flags: review?(dd)
Comment 4•15 years ago
|
||
Comment on attachment 438155 [details] [diff] [review]
fix
r+, Looks great.
I'd prefer it to be log.warn. Nothing really breaks, it's not a zamboni generated issue, it's just bad data that we're having to deal with.
Attachment #438155 -
Flags: review?(dd) → review+
Assignee | ||
Updated•15 years ago
|
Whiteboard: [z][stabby][need:livepages] → [z][stabby][need:livepages][patch]
Assignee | ||
Comment 5•15 years ago
|
||
thanks, 35b240dee052c3ec26ea2e20eecd37abf785ef73
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 6•15 years ago
|
||
Was there a specific URL that reproduced this, against which I can verify, or was this a one-off thing that you happened to have a stack on?
Assignee | ||
Comment 7•15 years ago
|
||
I don't know of a URL. I wouldn't worry about it.
Updated•15 years ago
|
Whiteboard: [z][stabby][need:livepages][patch] → [z][stabby][need:livepages][patch][qa-]
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
•