bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] improve behavior of mu_mimehdr_a?get_disp


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] improve behavior of mu_mimehdr_a?get_disp
Date: Tue, 27 Apr 2010 16:32:04 +0300

Kostik <address@hidden> ha escrit:

> The above example shows the attachment "bizzona.jpg" in my
> Thunderbird(2.0.0.24) and MS Outlook 2003 (others I have not tested). And
> my interest that it also could be extracted by my filter. Yes, this is
> invalid according to RFC, so MUAs should ignore it, but they are not.

Not necessarily: each program is free to handle an invalid input the
best way it can, and it is good if it is able to do so.  In that
particular case, I can only propose the attached patch.  It came right
of the top of my head, and I doubt if it doesn't break anything else.

> Sergey, what is your advice to me in this situation?

To begin with, test that patch as hard you can.  Please, report back
any results, be they positive or negative.  It looks too simple to
be right, so I'd better refrain from pushing it for now.

Then, please try to answer the following questions:

1. What MUA produces this? It is good to have a black-list of such MUAs,
that notoriously break the standards.
2. The same question for whitespace before the semicolon, please.
3. What other schizophrenic ways of packing the filename may this MUA
(or maybe others) implement? E.g. can the filename be encoded using QP
instead of B64?

Regards,
Sergey

diff --git a/mailbox/mimehdr.c b/mailbox/mimehdr.c
index 3391868..df6624c 100644
--- a/mailbox/mimehdr.c
+++ b/mailbox/mimehdr.c
@@ -176,7 +176,7 @@ _header_get_param (const char *field_body,
        }
       else
        {
-         for (e = v + 1; !(_ISSPECIAL (*e) || mu_isspace (*e)); e++)
+         for (e = v + 1; *e && !(*e == ';' || mu_isspace (*e)); e++)
            ;
          len = e - v;
        }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]