Not compatible with the Django 1.6 default JSON_SESSION_SERIALIZER
Bug #1252826 reported by
Tim Abbott
This bug affects 7 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
django-openid-auth |
Confirmed
|
Undecided
|
Unassigned | ||
python-django-openid-auth (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
In Django 1.6, the default session serliazer has been switched to one based on JSON, rather than pickles, to improve security. Django-openid-auth does not support this because it attemps to store content that is not JSON serializable in sessions. See https:/
Changed in python-django-openid-auth (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
I can confirm this. Traceback below:
Environment:
Request Method: GET 127.0.0. 1:8000/ openid/ login/
Request URL: http://
Django Version: 1.6 contrib. auth', contrib. contenttypes' , contrib. sessions' , contrib. sites', contrib. messages' , contrib. staticfiles' , openid_ auth', contrib. admin', contrib. comments' , middleware. common. CommonMiddlewar e', contrib. sessions. middleware. SessionMiddlewa re', middleware. csrf.CsrfViewMi ddleware' , contrib. auth.middleware .Authentication Middleware' , contrib. messages. middleware. MessageMiddlewa re')
Python Version: 2.7.5
Installed Applications:
('django.
'django.
'django.
'django.
'django.
'django.
'django_
'django.
'django.
'uploads')
Installed Middleware:
('django.
'django.
'django.
'django.
'django.
Traceback: python2. 7/dist- packages/ django/ core/handlers/ base.py" in get_response method( request, response) python2. 7/dist- packages/ django/ contrib/ sessions/ middleware. py" in process_response session. save() python2. 7/dist- packages/ django/ contrib/ sessions/ backends/ db.py" in save data=self. encode( self._get_ session( no_load= must_create) ), python2. 7/dist- packages/ django/ contrib/ sessions/ backends/ base.py" in encode ().dumps( session_ dict) python2. 7/dist- packages/ django/ core/signing. py" in dumps 'latin- 1') python2. 7/json/ __init_ _.py" in dumps sort_keys, **kw).encode(obj) python2. 7/json/ encoder. py" in encode python2. 7/json/ encoder. py" in iterencode python2. 7/json/ encoder. py" in default
File "/usr/lib/
201. response = middleware_
File "/usr/lib/
38. request.
File "/usr/lib/
57. session_
File "/usr/lib/
87. serialized = self.serializer
File "/usr/lib/
88. return json.dumps(obj, separators=(',', ':')).encode(
File "/usr/lib/
250. sort_keys=
File "/usr/lib/
207. chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/
270. return _iterencode(o, 0)
File "/usr/lib/
184. raise TypeError(repr(o) + " is not JSON serializable")
Exception Type: TypeError at /openid/login/ yadis.manager. YadisServiceMan ager object at 0x7fa43c0bea50> is not JSON serializable
Exception Value: <openid.