mirror of https://github.com/zulip/zulip.git
email mirror: ignore decoding errors.
Empirically, we only get these for malformed emails where the charset specified in a message part header does not match the true encoding of the part. I checked what the resulting Zulip looked like for the original offender, and it looked find with ignoring errors. (imported from commit ac6ba65b611cb22d4ec547b75a585abce6fc50b0)
This commit is contained in:
parent
b2a352da00
commit
f0911f51a0
|
@ -137,7 +137,7 @@ def get_message_part_by_type(message, content_type):
|
|||
if part.get_content_type() == content_type:
|
||||
content = part.get_payload(decode=True)
|
||||
if charsets[idx]:
|
||||
content = content.decode(charsets[idx])
|
||||
content = content.decode(charsets[idx], errors="ignore")
|
||||
return content
|
||||
|
||||
def extract_body(message):
|
||||
|
|
Loading…
Reference in New Issue