Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-06 Thread David Bremner
Tomi Ollila  writes:

> On Mon, Apr 06 2020, David Bremner wrote:
>
>> Leo Gaspard  writes:
>>
>>> David Bremner  writes:
>>>
 Leo Gaspard  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

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-06 Thread Tomi Ollila
On Mon, Apr 06 2020, David Bremner wrote:

> Leo Gaspard  writes:
>
>> David Bremner  writes:
>>
>>> Leo Gaspard  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
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-06 Thread Leo Gaspard
David Bremner  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?
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-06 Thread David Bremner
Leo Gaspard  writes:

> David Bremner  writes:
>
>> Leo Gaspard  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
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-06 Thread David Bremner
Leo Gaspard  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
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


notmuch-mode: Emails with PDF attachments incorrectly tagged as text/plain expose a few issues

2020-04-05 Thread Leo Gaspard
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*-MMDD-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
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch