[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Mark Lawrence breamore...@yahoo.co.uk added the comment: There are repeated statements that this impacts on Django which I understand is high profile. Can we find the resources to review the patches and get things moving, none of the attached patch files are that large? -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
R. David Murray rdmur...@bitdance.com added the comment: Committed Tony Nelson's fix to py3k in r82922, 3.1 in r72923, 2.7 in r82924, and 2.6 in r82925. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Changes by Barry A. Warsaw ba...@python.org: -- assignee: barry - r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
R. David Murray rdmur...@bitdance.com added the comment: See also issue 1721862, which has a different test and patch. This one seems simpler. -- nosy: +r.david.murray stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Tony Nelson tony_nel...@users.sourceforge.net added the comment: The OP's diagnosis of a buffer boundary problem is correct, but incomplete. The problem can be reproduced by calling feedparser FeedParser.feed() directly, or as my patch test does, by calling BufferedSubFile.push() directly. The proper fix is for push() to treat a last line ending in CR as a partial line, as it does if no part of a line ending is present. The OP's patch only works when FeedParser is called through the old Parser interface. -- nosy: +tony_nelson Added file: http://bugs.python.org/file13586/feedparser_pushcr_pushlf.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Karen Tracey [EMAIL PROTECTED] added the comment: Opening the file in universal newline mode doesn't work for cases where the 'file' contains multipart MIME data (eg. multipart/form-data) where one of the included parts is binary data (eg. application/octet-stream). In that case, blind translation of CRLF to LF may corrupt the binary data. (Thanks to Thomas Guettler for pointing that out to me.) FeedParser goes to considerable trouble to split on any conceivable line boundary but retain whatever line boundary existed in the stream when putting things back together. (Look at BufferedSubFile's push() code in feedparser.py.) It was not written on the assumption that it would be getting LFs only. The only code that knows enough to know which CRLFs are really line breaks is the code that is breaking the stream up based on the boundary markers -- that is the FeedParser code. It isn't safe for the caller to do any CRLF conversions before calling the Parser. Therefore I believe the fix needs to be made to the parser.py code, not the docs. Two people that I know of independently re-discovered this bug in the last couple of weeks (running Django), after I re-discovered it about three months ago after Jeremy Dunck re-discovered it a year earlier, three months after it was originally opened. Maybe a corner case, but it would be nice, since it is quite difficult for people to track down, and the fix is so trivial, if the fix could be put in. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Thomas Guettler [EMAIL PROTECTED] added the comment: I was hit by this bug in Django. The ticket URL: http://code.djangoproject.com/ticket/6256 It would be nice if this could be fixed. -- nosy: +guettli _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
Changes by Karen Tracey: -- nosy: +kmtracey _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue170 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com