[New-bugs-announce] [issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

Paulie Pena report at bugs.python.org
Mon Sep 12 21:14:40 CEST 2011


New submission from Paulie Pena <paulie4 at gmail.com>:

Even though RFC 6265's cookie-value's cookie-octet definition says that whitespace characters are not allowed (see http://tools.ietf.org/html/rfc6265), there are non-compliant web sites that send cookie values with newlines.  cookielib.LWPCookieJar will save the bad value in a cookie file, but when it tries to load it, it probably is only splitting by newlines, so it crashes on the invalid line.  The easiest thing would probably be to just ignore cookies that have values with a newline.  (Note: I'm using Python 2.5, so this might have been fixed in a later version.)

----------
components: Library (Lib)
messages: 143928
nosy: paulie4
priority: normal
severity: normal
status: open
title: cookielib.LWPCookieJar breaks on cookie values with a newline
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12966>
_______________________________________


More information about the New-bugs-announce mailing list