Opened 11 years ago
Closed 11 years ago
#23730 closed Bug (fixed)
Incorrect reliance on SimpleCookie roundtripping
| Reported by: | Tim Graham | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | HTTP handling | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
From Georg Brandl on the Python bug tracker:
"Django uses __init__(str()) roundtripping, which is not explicitly supported by the [SimpleCookie] library, and worked by accident with previous versions. That it works again with 3.3+ is another accident, and a bug."
If Python fixes this "bug", we'll need to backport a fix to all supported versions of Django. I'm working a patch using the solution suggested by Georg on the ticket.
Change History (4)
comment:1 by , 11 years ago
| Has patch: | set |
|---|
comment:2 by , 11 years ago
The Python ticket to introduce stricter parsing is #22796. Django's test suite is broken by the patch proposed on the Python ticket but passes once again with my pull request.
comment:3 by , 11 years ago
| Severity: | Release blocker → Normal |
|---|---|
| Version: | 1.6 → master |
It doesn't look like the Python fix will be backported, so this isn't so urgent. It will be necessary for Python 3.5 compatibility (#23763).
comment:4 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
PR. As this patch merely moves our workaround for a bug in Python (that
SimpleCookieis not pickable withHIGHEST_PROTOCOL), I also created an issue and submitted a patch for Python itself.