qrunner crashes on invalid unicode sequence
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When a message contains an invalud unicode sequence in its header, qrunner flat out crashes on that:
May 17 15:32:20 2015 (981) Uncaught runner exception: 'utf8' codec can't decode byte
0xe9 in position 18: invalid continuation byte
May 17 15:32:20 2015 (981) Traceback (most recent call last):
File "/var/lib/
self.
File "/var/lib/
keepqueued = self._dispose(
File "/var/lib/
more = self._dopipelin
File "/var/lib/
sys.
File "/var/lib/
i18ndesc = uheader(mlist, mlist.description, 'List-Id', maxlinelen=998)
File "/var/lib/
return Header(s, charset, maxlinelen, header_name, continuation_ws)
File "/usr/lib/
self.append(s, charset, errors)
File "/usr/lib/
ustr = unicode(s, incodec, errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 18: invalid
continuation byte
May 17 15:32:20 2015 (981) SHUNTING:
1431869540.
A solution for this specific case is to have Mailman/
I would say that this is actually a bug in python-email, since I think it doesn't make sense to set errors to "strict" rather than something like "replace" when the intention is to parse stuff so free-formed, under-specd
and user-controlled as email. Nonetheless, Mailman already sets errors='replace' in some places so it might aswell add it here.
Dupe due to launchpad instability.