Closed jtyers closed 3 years ago
Grepping for this string yields a single email (!) dated 2009. It contains an attachment with this frontmatter:
--Boundary-00=_R8akJcfwJIaKgCU
6 Content-Type: text/plain;
5 charset="iso 8859-15";
4 name="chain.mk"
3 Content-Transfer-Encoding: 7bit
2 Content-Disposition: attachment;
1 filename="chain.mk"
Manually changing the encoding in here to iso-8859-15
(notice the -
) fixes it! I'd suggest handling thing like this more gracefully though, the wild world of email can contain all sorts of bad inputs...
Thanks for the bug report. Indeed, sup should handle unrecognised encodings more gracefully than this.
Thank you very much for this bug report, @jtyers.
I am able to reproduce the crash: it seems to require a MIME part without a name, along with MIME header Content-Type
containing text/plain
and an invalid charset
.
That is, Sup is able to gracefully handle an invalid charset for a text/plain
MIME part when neither the Content-Disposition
MIME header contains a filename
, nor the Content-Type
MIME header a name
. This is normally the case for inline plain text. However, whenever we have at least one of these names, for a text/plain
MIME part with an invalid charset, then the crash is reproducible always.
Attached issue-585-demo.txt - a full example email which triggers the crash when opened in Sup (latest version from git develop branch: sup v1.1-git-bb204e66
).
When I have a bit more time, I'll dig into this a bit more, and see if I can create a patch (and test case to avoid future regressions).
I had time earlier than I thought. :-) I will raise a PR just now.
Hello, I'm a new user of
sup
, just trying it out. I've imported my mail from Gmail as per your instructions usingofflineimap
. Lots of emails appear insup
, though only up to 2009.While playing with the keybindings to find my way around, I triggered a crash. For this one I pressed
,
from the inbox buffer.I'm running Arch.
Trace below: