Added handling for a decoding exception during submission processing.

- Legacy-Id: 17151
This commit is contained in:
Henrik Levkowetz 2019-12-16 13:32:51 +00:00
parent 0fe23c3ae5
commit 202d112e0d

View file

@ -44,7 +44,10 @@ class PlainParser(FileParser):
if self.parsed_info.charset in ['us-ascii', 'utf-8']:
while limit:
limit -= 1
line = self.fd.readline().decode(self.parsed_info.charset)
try:
line = self.fd.readline().decode(self.parsed_info.charset)
except UnicodeDecodeError:
return
match = draftre.search(line)
if not match:
continue