]> diplodocus.org Git - nmh/commitdiff
back out use of RFC 2047 decoding on the filename
authorOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 28 Sep 2016 07:58:54 +0000 (09:58 +0200)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 28 Sep 2016 08:28:11 +0000 (10:28 +0200)
The RFCs clearly state that an encoded word should not be used in
the MIME parameters and the scheme from RFC2231 should be used
instead. nmh supports that. Unfortunately, other mail clients,
in particular gmail and IBM/Lotus Notes, produce messages with
the invalid encoding.

uip/mhstoresbr.c

index f1756a8..62a5ba4 100644 (file)
@@ -1055,7 +1055,6 @@ get_storeproc (CT ct)
 {
     char *cp;
     CI ci;
-    char storefile[PATH_MAX+1];
 
     /*
      * If the storeproc has already been defined,
@@ -1071,13 +1070,12 @@ get_storeproc (CT ct)
      */
     if (ct->c_dispo) {
        if ((cp = get_param(ct->c_dispo_first, "filename", '_', 0))
-               && decode_rfc2047(cp, storefile, PATH_MAX+1)
-               && *storefile != '/'
-               && *storefile != '.'
-               && *storefile != '|'
-               && *storefile != '!'
-               && !strchr (storefile, '%')) {
-               ct->c_storeproc = add (storefile, NULL);
+               && *cp != '/'
+               && *cp != '.'
+               && *cp != '|'
+               && *cp != '!'
+               && !strchr (cp, '%')) {
+               ct->c_storeproc = add (cp, NULL);
                free(cp);
                return;
        }
@@ -1092,13 +1090,12 @@ get_storeproc (CT ct)
      */
     ci = &ct->c_ctinfo;
     if ((cp = get_param(ci->ci_first_pm, "name", '_', 0))
-         && decode_rfc2047(cp, storefile, PATH_MAX+1)
-         && *storefile != '/'
-         && *storefile != '.'
-         && *storefile != '|'
-         && *storefile != '!'
-         && !strchr (storefile, '%')) {
-           ct->c_storeproc = add (storefile, NULL);
+         && *cp != '/'
+         && *cp != '.'
+         && *cp != '|'
+         && *cp != '!'
+         && !strchr (cp, '%')) {
+           ct->c_storeproc = add (cp, NULL);
 
     }
     if (cp)