#24492: Bug in BaseCookie load can result in cookies not being set
-------------------------------+--------------------
Reporter: mhsparks | Owner: nobody
Type: Uncategorized | Status: new
Component: HTTP handling | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
A bug with the Python cookie library means that cookies with square
brackets (and all subsequent cookies) are ignored.
http://bugs.python.org/issue22931
As far as I can tell this effects 2.7.9 and 3.4+
In our case some users had a s_vi cookie which appears to come from Adobe
Site Catalyst. As this cookie contains square brackets, the Django
sessionid which appeared later in the cookie string was being ignored and
the user was unable to login.
Here's a simple test case.
{{{
>>> from django.http.cookie import SimpleCookie
>>> dd = SimpleCookie()
>>> dd.load('a=b; c=[; d=r')
>>> dd.output()
'Set-Cookie: a=b'
}}}
Should we try and code around this in `http/cookie.py` where other
standard library issues are handled?
--
Ticket URL: <https://code.djangoproject.com/ticket/24492>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.aa322f66ce4a2a808cdfb548c46029fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.