tags 294212 +pending
forwarded 294212 [EMAIL PROTECTED]
thanks

On Tue, 08 Feb 2005 15:34:08 +0100, Robert Waldner writes:

(see <URL:http://bugs.debian.org/294212> for the full story)

>My previous observation was not entirely correct, though, exmh doesn't /ignore
>/ the mailcap, it rather seems to somehow mangle Content-Types which contain a
>dot (like application/vnd.ms-powerpoint).

>For example, from a raw message:
>Content-Type: application/vnd.ms-powerpoint;
>       name="file.pps"
>
>I see in exmh
>------
>2.     file.pps        (application/vndms-powerpoint)
>Note the now missing dot in the Content-Type.

found the problem & fixed it. the original implementation did "sanitize"
the content-type a bit too eagerly: only alphanumerics, the hyphen 
and the forward slash survived. rfc2045 is a bit more generous.

i'll upload a new debian version tonight; for now you can just
patch /usr/lib/exmh/mime.tcl with the attached diff and you're set.

dear upstream cvs committers: could somebody please apply that patch to
the cvs version?

regards
az

--- mime.tcl.orig       Wed Feb  9 11:12:14 2005
+++ mime.tcl    Wed Feb  9 11:13:49 2005
@@ -318,9 +318,11 @@
        set type text/plain
     }
     # Paranoia time - sanitize these just in case...
-    # Yes, we're ignoring the rfc2045 sec 5.1 definition of 'tspecials'
+    # rfc2045: any ascii char except space, controls and
+    # the tspecials: ()<>@,;:\"/[]?=
+    # the forward slash is kept.
     set mimeHdr($part,hdr,content-type) $contentType
-    regsub -all {[^-/[:print:]]} $type {} type
+    regsub -all {[[:cntrl:][:blank:]()<>@,;:\\"?=[.[.][.].]]} $type {} type
     set mimeHdr($part,type) $type
     regsub -all {[^-[:print:]]} $encoding {} encoding
     set mimeHdr($part,encoding) $encoding
-- 
+ Alexander Zangerl + DSA 42BD645D + (RSA 5B586291)
"The Two Phases Of University Employment: 
1.  Doesn't know enough to get a Real Job.
2.  Knows too much to want a Real Job." -- sharks

Attachment: pgp4Er8UuM5wX.pgp
Description: PGP signature

Reply via email to