unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
@ 2020-04-05 23:12 Leo Gaspard
  2020-04-06 10:30 ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Gaspard @ 2020-04-05 23:12 UTC (permalink / raw)
  To: notmuch

Hello,

I have recently started conversing with someone whose email client
incorrectly tags PDF attachments as text/plain.

This triggered at least three bugs in what I assume to be notmuch:

- `w` on the notmuch-show window, to save the attachments, corrupts the
  PDF before writing it (checked by also saving the same attachment from
  thunderbird, the PDF opened cleanly)

- `r` still on the notmuch-show window, while it does properly open a
  reply email to the given email, also adds all the PDF's text at the
  end of the reply, resulting in jumbled text down there

- Trying to send said reply mail triggers a freeze of emacs before
  actually sending the email (which I, this time, had to `kill` twice so
  that it would accept to shutdown without me resorting to `kill -9`'ing
  it -- I seem to remember that, last time this happened to me, I just
  waited not that long and it eventually managed to send, though I think
  I still had to kill emacs after that)

- (I'm not sure this one isn't a message-mode bug, hence not counting it
  -- but just trying `emacs -Q [the offending file]` then
  `M-x message-mode` didn't reproduce, so I'm just writing it down here)
  Trying to edit the `#*message*-YYYYMMDD-HHMMSS#` file left behind by
  the previous emacs freeze is awfully slow

Anyway, as usual, thank you for all your work on notmuch!

Cheers,
  Leo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
  2020-04-05 23:12 notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues Leo Gaspard
@ 2020-04-06 10:30 ` David Bremner
       [not found]   ` <87ftdgbnyr.fsf@llwynog.ekleog.org>
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2020-04-06 10:30 UTC (permalink / raw)
  To: Leo Gaspard, notmuch

Leo Gaspard <leo@gaspard.io> writes:

> Hello,
>
> I have recently started conversing with someone whose email client
> incorrectly tags PDF attachments as text/plain.
>

Hi Leo;

As I mentioned on IRC, we most likely need a reproducer message before
making any progress on this. Maybe you can ask your correspondent to
send you a shareable message, then sanitize the addesses in the headers.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
       [not found]   ` <87ftdgbnyr.fsf@llwynog.ekleog.org>
@ 2020-04-06 17:17     ` David Bremner
  2020-04-06 19:23       ` Leo Gaspard
  2020-04-06 21:33       ` Tomi Ollila
  0 siblings, 2 replies; 6+ messages in thread
From: David Bremner @ 2020-04-06 17:17 UTC (permalink / raw)
  To: Leo Gaspard, notmuch

Leo Gaspard <leo@gaspard.io> writes:

> David Bremner <david@tethera.net> writes:
>
>> Leo Gaspard <leo@gaspard.io> writes:
>>
>>> Hello,
>>>
>>> I have recently started conversing with someone whose email client
>>> incorrectly tags PDF attachments as text/plain.
>>>
>>
>> Hi Leo;
>>
>> As I mentioned on IRC, we most likely need a reproducer message before
>> making any progress on this. Maybe you can ask your correspondent to
>> send you a shareable message, then sanitize the addesses in the headers.
>
> So, I've just been able to re-create at least the “freeze on reply” isue
> with the email attached. The image doesn't get corrupted when saving,
> though, so I'm not sure it'll be enough to fix both issues, but
> hopefully fixing this one would fix the other one too.
>
> If you try to notmuch-show on the attached email, then hit `r`, you
> should notice the image being included verbatim in the text/plain
> output, and when hitting C-c C-c it should start freezing emacs.
>
> Hope that helps!
>   Leo

Probably the rest of the list hasn't seen the message yet, but I did try
it out. It doesn't actually hang emacs for me (C-g enough times gets me
back). I agree that inserting binary data into the buffer is probably
not a great idea.  I'm not sure offhand how notmuch should detect
mislabeled parts. Perhaps it should just refuse to insert large parts as
reply text.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
  2020-04-06 17:17     ` David Bremner
@ 2020-04-06 19:23       ` Leo Gaspard
  2020-04-06 21:33       ` Tomi Ollila
  1 sibling, 0 replies; 6+ messages in thread
From: Leo Gaspard @ 2020-04-06 19:23 UTC (permalink / raw)
  To: David Bremner, notmuch

David Bremner <david@tethera.net> writes:
> Probably the rest of the list hasn't seen the message yet, but I did try
> it out. It doesn't actually hang emacs for me (C-g enough times gets me
> back). I agree that inserting binary data into the buffer is probably
> not a great idea.  I'm not sure offhand how notmuch should detect
> mislabeled parts. Perhaps it should just refuse to insert large parts as
> reply text.

Oh right, as it displayed the spinning wheel mouse I had assumed emacs
was frozen. So for me what happens on C-g enough times is that it gets
me back to the non-sent reply.

As for what to do… maybe something like not inserting things that are
not properly encoded would be a solution?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
  2020-04-06 17:17     ` David Bremner
  2020-04-06 19:23       ` Leo Gaspard
@ 2020-04-06 21:33       ` Tomi Ollila
  2020-04-06 21:59         ` David Bremner
  1 sibling, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2020-04-06 21:33 UTC (permalink / raw)
  To: notmuch

On Mon, Apr 06 2020, David Bremner wrote:

> Leo Gaspard <leo@gaspard.io> writes:
>
>> David Bremner <david@tethera.net> writes:
>>
>>> Leo Gaspard <leo@gaspard.io> writes:
>>>
>>>> Hello,
>>>>
>>>> I have recently started conversing with someone whose email client
>>>> incorrectly tags PDF attachments as text/plain.
>>>>
>>>
>>> Hi Leo;
>>>
>>> As I mentioned on IRC, we most likely need a reproducer message before
>>> making any progress on this. Maybe you can ask your correspondent to
>>> send you a shareable message, then sanitize the addesses in the headers.
>>
>> So, I've just been able to re-create at least the “freeze on reply” isue
>> with the email attached. The image doesn't get corrupted when saving,
>> though, so I'm not sure it'll be enough to fix both issues, but
>> hopefully fixing this one would fix the other one too.
>>
>> If you try to notmuch-show on the attached email, then hit `r`, you
>> should notice the image being included verbatim in the text/plain
>> output, and when hitting C-c C-c it should start freezing emacs.
>>
>> Hope that helps!
>>   Leo
>
> Probably the rest of the list hasn't seen the message yet, but I did try
> it out. ...

Rest of the list hasn't seen the message (yet?) as the body is 440805 bytes
in size (and there is limit in the mailing list) and it is hanging in 
moderator queue. I am not too enthusiastic to bloat the mailing list
archive with just a large test message (but am not against is there more
people who do think that it is a good idea).

Tomi

> ... It doesn't actually hang emacs for me (C-g enough times gets me
> back). I agree that inserting binary data into the buffer is probably
> not a great idea.  I'm not sure offhand how notmuch should detect
> mislabeled parts. Perhaps it should just refuse to insert large parts as
> reply text.
>
> d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues
  2020-04-06 21:33       ` Tomi Ollila
@ 2020-04-06 21:59         ` David Bremner
  0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2020-04-06 21:59 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Mon, Apr 06 2020, David Bremner wrote:
>
>> Leo Gaspard <leo@gaspard.io> writes:
>>
>>> David Bremner <david@tethera.net> writes:
>>>
>>>> Leo Gaspard <leo@gaspard.io> writes:
>>>>
>>>>> Hello,
>>>>>
>>>>> I have recently started conversing with someone whose email client
>>>>> incorrectly tags PDF attachments as text/plain.
>>>>>
>>>>
>>>> Hi Leo;
>>>>
>>>> As I mentioned on IRC, we most likely need a reproducer message before
>>>> making any progress on this. Maybe you can ask your correspondent to
>>>> send you a shareable message, then sanitize the addesses in the headers.
>>>
>>> So, I've just been able to re-create at least the “freeze on reply” isue
>>> with the email attached. The image doesn't get corrupted when saving,
>>> though, so I'm not sure it'll be enough to fix both issues, but
>>> hopefully fixing this one would fix the other one too.
>>>
>>> If you try to notmuch-show on the attached email, then hit `r`, you
>>> should notice the image being included verbatim in the text/plain
>>> output, and when hitting C-c C-c it should start freezing emacs.
>>>
>>> Hope that helps!
>>>   Leo
>>
>> Probably the rest of the list hasn't seen the message yet, but I did try
>> it out. ...
>
> Rest of the list hasn't seen the message (yet?) as the body is 440805 bytes
> in size (and there is limit in the mailing list) and it is hanging in 
> moderator queue. I am not too enthusiastic to bloat the mailing list
> archive with just a large test message (but am not against is there more
> people who do think that it is a good idea).
>

I'm happy to forward it to anybody who wants it.

So I think you can delete it from the moderation queue; the content
other than the attachement is in my last reply.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-06 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 23:12 notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues Leo Gaspard
2020-04-06 10:30 ` David Bremner
     [not found]   ` <87ftdgbnyr.fsf@llwynog.ekleog.org>
2020-04-06 17:17     ` David Bremner
2020-04-06 19:23       ` Leo Gaspard
2020-04-06 21:33       ` Tomi Ollila
2020-04-06 21:59         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).