|
From: <jgr...@us...> - 2003-04-27 00:20:55
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv27871/Classifier
Modified Files:
MailParse.pm
Log Message:
Added pseudowords html:imgremotesrc to catch The Big Picture spams
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -d -r1.117 -r1.118
*** MailParse.pm 27 Apr 2003 00:11:57 -0000 1.117
--- MailParse.pm 27 Apr 2003 00:20:51 -0000 1.118
***************
*** 408,412 ****
( ( $tag =~ /^img|frame|iframe$/i )
|| ( $tag =~ /^script$/i && $parse_script_uri ) ) ) {
! add_url( $self, $value, $encoded, $quote, $end_quote, '' );
next;
}
--- 408,423 ----
( ( $tag =~ /^img|frame|iframe$/i )
|| ( $tag =~ /^script$/i && $parse_script_uri ) ) ) {
! my $host = add_url( $self, $value, $encoded, $quote, $end_quote, '' );
!
! # If the host name is not blank (i.e. there was a hostname in the url
! # and it was an image, then if the host was not this host then report
! # an off machine image
!
! if ( ( $host ne '' ) && ( $tag =~ /^img$/i ) ) {
! if ( $host ne 'localhost' ) {
! $self->update_pseudoword( 'html', 'imgremotesrc' );
! }
! }
!
next;
}
***************
*** 539,542 ****
--- 550,555 ----
# identification of values found in for example the subject line
#
+ # Returns the hostname
+ #
# ---------------------------------------------------------------------------------------------
sub add_url
***************
*** 642,648 ****
}
! if ( !defined $host || $host eq '' ) {
print "no hostname found: [$temp_url]\n" if ($self->{debug});
! return 0;
}
--- 655,661 ----
}
! if ( !defined( $host ) || ( $host eq '' ) ) {
print "no hostname found: [$temp_url]\n" if ($self->{debug});
! return '';
}
***************
*** 652,656 ****
$hash = $1 if ( $url =~ s/^[\#](.*)$// );
! if ( !defined $protocol || $protocol =~ /^(http|https)$/ ) {
$temp_before = $before;
$temp_before = "\:\/\/" if (defined $protocol);
--- 665,669 ----
$hash = $1 if ( $url =~ s/^[\#](.*)$// );
! if ( !defined( $protocol ) || ( $protocol =~ /^(http|https)$/ ) ) {
$temp_before = $before;
$temp_before = "\:\/\/" if (defined $protocol);
***************
*** 678,682 ****
# $protocol $authinfo $host $port $query $hash may be processed below if desired
! return 1;
}
--- 691,695 ----
# $protocol $authinfo $host $port $query $hash may be processed below if desired
! return $host;
}
|