HyperArch.py throws IndexError: string index out of range
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Incomplete
|
Undecided
|
Mark Sapiro |
Bug Description
There is code in Mailman/
charset = message.
if charset:
charset = charset.
if charset[0]=='"' and charset[-1]=='"':
if charset[0]=="'" and charset[-1]=="'":
This code can throw an IndexError if get_content_
File "Mailman/
if charset[0]=='"' and charset[-1]=='"':
IndexError: string index out of range
The obvious, 'simple' fix for this is to change
if charset:
to
if charset and charset.strip():
which will avoid the exception, but I really want to see an actual message that triggers this error as a test case for this and future changes.
Unfortunately, despite trying with multiple versions of the Python email package, the only way I can get get_content_
Content-Type: text/plain; charset=" "
which seems a bit too contrived to actually occur in the wild.
Thus, if anyone can provide an actual message that triggers this exception, please attach it here.
Changed in mailman: | |
status: | New → Incomplete |