diff options
author | glewis <glewis@FreeBSD.org> | 2004-02-25 01:03:43 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2004-02-25 01:03:43 +0800 |
commit | 1bd247d4bdaf25808d31cae6059463c26bef294b (patch) | |
tree | 264a24f6e83db4a8e356cfc0fa74638494f63b1f /mail | |
parent | 734aadcf1fb4d190bd5ec0d59700d6db5feb0bcb (diff) | |
download | freebsd-ports-gnome-1bd247d4bdaf25808d31cae6059463c26bef294b.tar.gz freebsd-ports-gnome-1bd247d4bdaf25808d31cae6059463c26bef294b.tar.zst freebsd-ports-gnome-1bd247d4bdaf25808d31cae6059463c26bef294b.zip |
. Detect damaged MIME structures which allowed some viruses to pass
through undetected.
. Bump PORTREVISION
PR: 63274
Submitted by: Jan-Peter Koopmann <j.koopmann@seceidos.de> (maintainer)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mailscanner/Makefile | 1 | ||||
-rw-r--r-- | mail/mailscanner/files/patch-lib:MailScanner:Message.pm | 59 |
2 files changed, 56 insertions, 4 deletions
diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile index ef737b63b689..8042ee7a518e 100644 --- a/mail/mailscanner/Makefile +++ b/mail/mailscanner/Makefile @@ -7,6 +7,7 @@ PORTNAME= MailScanner PORTVERSION= 4.26.8 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/ DISTNAME= MailScanner-${PORTVERSION}-${PATCHLEVEL} diff --git a/mail/mailscanner/files/patch-lib:MailScanner:Message.pm b/mail/mailscanner/files/patch-lib:MailScanner:Message.pm index 38d787a773a9..b02e4b64fec9 100644 --- a/mail/mailscanner/files/patch-lib:MailScanner:Message.pm +++ b/mail/mailscanner/files/patch-lib:MailScanner:Message.pm @@ -1,5 +1,5 @@ ---- ../MailScanner-4.26.8.orig/lib/MailScanner/Message.pm Fri Feb 13 09:31:30 2004 -+++ lib/MailScanner/Message.pm Fri Feb 13 09:38:35 2004 +--- ../MailScanner-4.26.8.orig/lib/MailScanner/Message.pm Mon Feb 23 17:37:26 2004 ++++ lib/MailScanner/Message.pm Mon Feb 23 17:38:33 2004 @@ -2,7 +2,7 @@ # MailScanner - SMTP E-Mail Virus Scanner # Copyright (C) 2002 Julian Field @@ -170,7 +170,7 @@ #print STDERR "Adding file $file type $text\n"; $this->{alltypes}{$file} .= $text; + $types{$file} .= $text; - } ++ } + + # Now look for the reports we can't match anywhere and make them + # map to the entire message. @@ -182,8 +182,59 @@ + $this->{allreports}{""} .= $value; + $this->{alltypes}{""} .= $types{$key}; + } -+ } + } + #print STDERR "Finished combining reports\n"; } +@@ -3309,6 +3405,50 @@ + $index = $#{$self->{ME_Parts}} + 2 + $index if ($index < 0); + splice(@{$self->{ME_Parts}}, $index, 0, $part); + $part; ++} ++ ++ ++# ++# Over-ride a function in Mail::Header that parses the block of headers ++# at the top of each MIME section. My improvement allows the first line ++# of the header block to be missing, which breaks the original parser ++# though the filename is still there. ++# ++ ++package Mail::Header; ++ ++sub extract ++{ ++ my $me = shift; ++ my $arr = shift; ++ my $line; ++ ++ $me->empty; ++ ++ # JKF Make this more robust by allowing first line of header to be missing ++ shift @{$arr} while scalar(@{$arr}) && ++ $arr->[0] =~ /\A[ \t]+/o && ++ $arr->[1] =~ /\A$FIELD_NAME/o; ++ # JKF End mod here ++ ++ while(scalar(@{$arr}) && $arr->[0] =~ /\A($FIELD_NAME|From )/o) ++ { ++ my $tag = $1; ++ ++ $line = shift @{$arr}; ++ $line .= shift @{$arr} ++ while(scalar(@{$arr}) && $arr->[0] =~ /\A[ \t]+/o); ++ ++ ($tag,$line) = _fmt_line($me,$tag,$line); ++ ++ _insert($me,$tag,$line,-1) ++ if defined $line; ++ } ++ ++ shift @{$arr} ++ if(scalar(@{$arr}) && $arr->[0] =~ /\A\s*\Z/o); ++ ++ $me; + } + + |