#7233: placing request.POST.copy() in session wipes all session values
----------------------------------------------+-----------------------------
Reporter: mikechambers | Owner: nobody
Status: new | Milestone: 1.0
Component: django.contrib.sessions | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
----------------------------------------------+-----------------------------
Comment (by mtredinnick):
This patch still doesn't completely solve the problem. There's an issue
that the order in which attributes are pickled depends upon dictionary
hashing order, which varies from platform to platform. On the machine I'm
on right now, for example, I can happily pickle and unpickle QuerySets,
mutable or immutable, without any problems.
It seems that in some cases, however, the `_mutable` attribute is pickled
(and therefore restored) after some of the dictionary items. Take that one
step further and you realise that it's also possible for `encoding` to be
pickled after those values, which means that it will have a value of
`None` during calls to `__setitem__()`, which will lead to an exception
being raised by `unicode()`, since that cannot have a second parameter
value of `None`.
I've got a patch that works around that, but I can't commit it right this
minute because I'm having trouble reaching the subversion repo over the
network I'm on. Will commit it tomorrow morning. Mostly making a note here
so that another committer doesn't accidentally duplicate the thinking and
work.
--
Ticket URL: <http://code.djangoproject.com/ticket/7233#comment:14>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---