[Mimedefang] MIMEDefang 2.22-BETA-4 is available

Christoph Martin martin at verwaltung.uni-mainz.de
Wed Oct 9 11:38:00 EDT 2002


"David F. Skoll" <dfs at roaringpenguin.com> writes:

> On 8 Oct 2002, Christoph Martin wrote:
> 
> > Will these patches ever make it into the upstream version of
> > MIME-tools?
> 
> The MIME-tools author has been unresponsive to me.
> 
> > On Debian there is already a MIME-tools version in the system and I
> > don't want to overwrite it with this patched version.
> 
> Well, if you do not, viruses may slip through, because the original
> MIME-tools contains some bugs, and does not understand RFC-2231
> encoding.  If the original author is unreceptive to the patches, maybe
> the Debian people will integrate them?

Hmm, I just found out, that the Debian maintainer included a similar
patch in the latest release that came from the amavis-ng people: See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=146448&repeatmerged=yes 

--- MIME-tools-5.411/lib/MIME/Parser.pm~	Sun Nov 12 07:55:11 2000
+++ MIME-tools-5.411/lib/MIME/Parser.pm	Sat Apr 27 17:48:08 2002
@@ -592,6 +592,7 @@
 #
 # I<Instance method.>
 # Process and return the next header.
+# Return undef if, instead of a header, the encapsulation boundary is found.
 # Fatal exception on failure.
 #
 sub process_header {
@@ -612,6 +613,10 @@
     foreach (@headlines) { s/[\r\n]+\Z/\n/ }  ### fold
 
     ### How did we do?
+    if ($hdr_rdr->eos_type eq 'DELIM') {
+	$self->whine("bogus part, without CRLF before body");
+	return;
+    }
     ($hdr_rdr->eos_type eq 'DONE') or
 	$self->error("unexpected end of header\n");
 
@@ -983,7 +988,17 @@
 
     ### Parse and add the header:
     my $head = $self->process_header($in, $rdr);
-    $ent->head($head);   
+    if (not defined $head) {
+	$self->debug("bogus empty part");
+	$head = $self->interface('HEAD_CLASS')->new;
+	$head->mime_type('text/plain; charset=US-ASCII');
+	$ent->head($head);
+	$ent->bodyhandle($self->new_body_for($head));
+	$ent->bodyhandle->open("w")->close;
+	$self->results->level(-1);
+	return $ent;
+    }
+    $ent->head($head);
 
     ### Tweak the content-type based on context from our parent...
     ### For example, multipart/digest messages default to type message/rfc822:

Do you still have a patch file for download availlable? I could the
Debian maintainer to this patch.

Christoph

-- 
============================================================================
Christoph Martin, EDV der Verwaltung, Uni-Mainz, Germany
 Internet-Mail:  Christoph.Martin at Uni-Mainz.DE
  Telefon: +49-6131-3926337



More information about the MIMEDefang mailing list