Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue27737

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:email.header.Header.encode() crashes with IndexError on spaces only value
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Tim.Graham, barry, r.david.murray
Priority:normalKeywords:patch

Created on2016-08-11 13:51 byTim.Graham, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
whitespace-header-test.diffTim.Graham,2016-08-11 13:51regression test for cpython's test suitereview
Pull Requests
URLStatusLinkedEdit
PR 13478mergedBTaskaya,2019-05-21 23:28
PR 13517mergedmiss-islington,2019-05-23 01:13
Messages (4)
msg272447 -(view)Author: Tim Graham (Tim.Graham)*Date: 2016-08-11 13:51
Python 2.7:>>> from email.header import Header>>> Header(' ').encode()''Python 3.2+ (I didn't check older versions of Python 3):>>> Header(' ').encode()Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "/home/tim/code/cpython/Lib/email/header.py", line 391, in encode    value = formatter._str(linesep)  File "/home/tim/code/cpython/Lib/email/header.py", line 427, in _str    self.newline()  File "/home/tim/code/cpython/Lib/email/header.py", line 439, in newline    self._lines[-1] += str(self._current_line)IndexError: list index out of range(Originally reported athttps://code.djangoproject.com/ticket/27051)
msg343262 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2019-05-23 01:13
New changesetef5bb25e2d6147cd44be9c9b166525fb30485be0 by R. David Murray (Batuhan Taşkaya) in branch 'master':bpo-27737: Allow whitespace only headers encoding (#13478)https://github.com/python/cpython/commit/ef5bb25e2d6147cd44be9c9b166525fb30485be0
msg343264 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2019-05-23 01:17
Thanks.
msg343269 -(view)Author: R. David Murray (r.david.murray)*(Python committer)Date: 2019-05-23 01:41
New changeset0416d6f05a96e0f1b3751aa97abfffe6d3323976 by R. David Murray (Miss Islington (bot)) in branch '3.7':bpo-27737: Allow whitespace only headers encoding (GH-13478) (#13517)https://github.com/python/cpython/commit/0416d6f05a96e0f1b3751aa97abfffe6d3323976
History
DateUserActionArgs
2022-04-11 14:58:34adminsetgithub: 71924
2019-05-23 01:41:47r.david.murraysetmessages: +msg343269
2019-05-23 01:17:21r.david.murraysetstatus: open -> closed
versions: + Python 3.7, Python 3.8, - Python 3.4, Python 3.5, Python 3.6
messages: +msg343264

resolution: fixed
stage: patch review -> resolved
2019-05-23 01:13:46miss-islingtonsetpull_requests: +pull_request13434
2019-05-23 01:13:30r.david.murraysetmessages: +msg343262
2019-05-21 23:28:19BTaskayasetstage: needs patch -> patch review
pull_requests: +pull_request13390
2016-08-11 13:58:56SilentGhostsetnosy: +barry,r.david.murray
stage: needs patch
type: behavior

versions: - Python 3.2, Python 3.3
2016-08-11 13:51:04Tim.Grahamcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp