[SJF Logo]
Steve Friedl's Weblog

December 27, 2002
Patch for mpack-1.5

mpack is a package for working with MIME mail packing and unpacking from the UNIX command line, and I've used it for years. At a customer we found that it was unpacking a file to the wrong place, and a bit of investigation showed a clear typo in the code.

When a MIME part contains (emphasis mine):


Content-Type: text/plain;
      charset=us-ascii;
      name=foo.txt;
Content-Disposition: attachment;
      filename=foo.txt;
the semicolon gets included as part of the filename, which is later turned into an "X" before the file is created. So foo.txt is saved as foo.txtX. This only happens if the filename is not quoted, and reading the source in decode.c shows that it's an out-and-out bug (the code doesn't match a correct and descriptive comment).

Email to the maintainer's address has bounced, so it's not clear how actively this code is being supported.

The very simple patch for this can be found here: mpack-1.5-patch.txt

Posted by Steve at December 27, 2002 08:24 AM | TrackBack
Comments
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?