[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2021-04-26 Thread Senthil Kumaran
Senthil Kumaran added the comment: This bug was reported in 2.5 and we don't have a test case attached in this report. Given many changes and age of the bug, I am closing this. A specific report against the latest code will help us to fix this bug. -- stage: -> resolved status:

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12966 ___

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena
Paulie Pena paul...@gmail.com added the comment: RFC 2109's Section 4.1 Syntax: General (http://www.ietf.org/rfc/rfc2109.txt) states that the attributes and values should be tokens, which the define as (informally, a sequence of non-special, non-white space characters) from the HTTP/1.1

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: By it crashes on the invalid line do you mean Python raises an exception, prints a traceback, and exits? Or does it seqfault, dump core, or the Windows equivavlent? -- ___ Python tracker

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena
Paulie Pena paul...@gmail.com added the comment: Sorry, by crash I did mean that it raised an exception. My program wasn't expecting cookielib to fail while reading a cookie file that it had written, so I didn't wrap the code to read the cookie file in a try..except. I would imagine that

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: It would be better to raise an exception* upon receiving a cookie. On the other hand, I presume cookies are stored in files that any process can mess with, so reading failures are always a possibility. So if you want to catch a (very rare)

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-26 Thread Paulie Pena
Paulie Pena paul...@gmail.com added the comment: OK, I'll wrap it in a try-except. Do you think the documentation should updated to make users aware of this possible problem? Thanks, Paulie -- ___ Python tracker rep...@bugs.python.org

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-16 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Some notes: In 3.x, cookielib is http.cookiejar. LWPCookieJar is a subclass of FileCookieJar. The module follows RFC 2109 and RFC 2965. RFC 6265 is labelled a 'PROPOSED STANDARD' that 'obsoletes' 2965, but its status is unclear to me. RFC

[issue12966] cookielib.LWPCookieJar breaks on cookie values with a newline

2011-09-12 Thread Paulie Pena
New submission from Paulie Pena paul...@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.