diff options
author | ache <ache@FreeBSD.org> | 2003-06-18 09:03:36 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-06-18 09:03:36 +0000 |
commit | dbde14383f23537e3aa4bacee1bcd7a6820a4ac0 (patch) | |
tree | 6d88a08d1620e637d193b47cf223983a713033c5 /mail/ricochet/files | |
parent | fabc6fc61a013284692a3ce0ce06c800e850b852 (diff) | |
download | FreeBSD-ports-dbde14383f23537e3aa4bacee1bcd7a6820a4ac0.zip FreeBSD-ports-dbde14383f23537e3aa4bacee1bcd7a6820a4ac0.tar.gz |
Don't trust IP comes from fake HELO
Diffstat (limited to 'mail/ricochet/files')
-rw-r--r-- | mail/ricochet/files/patch-ricochet | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mail/ricochet/files/patch-ricochet b/mail/ricochet/files/patch-ricochet index a163df9..32e3240 100644 --- a/mail/ricochet/files/patch-ricochet +++ b/mail/ricochet/files/patch-ricochet @@ -1,5 +1,5 @@ --- ricochet.orig Thu Feb 8 22:23:19 2001 -+++ ricochet Sun May 19 12:24:58 2002 ++++ ricochet Wed Jun 18 12:52:41 2003 @@ -128,7 +128,10 @@ ## List of receipients at ORIG_DOMAN ## besides the CONTACTS. @@ -55,12 +55,13 @@ $received =~ /from\s(.*?)$rfc/s; my $from = " $1 "; $received =~ /by\s(.*?)$rfc/s; my $by = " $1 "; - my @orig_hosts = $from =~ /($HOSTRE)/gs; -+ +- my @orig_ips = $from =~ /($IPRE)/gs; +- my @transmit_hosts = $by =~ /($HOSTRE)/gs; + + ## Trust only "(host.name [" part, HELO can be fake + my @orig_hosts = $from =~ /\([^()\[\]]*?($HOSTRE)[^()\[\]]*?\[/gs; - my @orig_ips = $from =~ /($IPRE)/gs; - my @transmit_hosts = $by =~ /($HOSTRE)/gs; -- ++ my @orig_ips = $from =~ /\([^()\[\]]*\[($IPRE)\]/gs; ++ my @transmit_hosts = $by =~ /($HOSTRE)/gs; my @ips = $by =~ /($IPRE)/gs; + + my $header = $self->{MAIL}->head; |