|
From: <ssc...@us...> - 2003-04-27 02:57:16
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21009
Modified Files:
MailParse.pm
Log Message:
protect CID: URL's from identification as off-site images
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -d -r1.118 -r1.119
*** MailParse.pm 27 Apr 2003 00:20:51 -0000 1.118
--- MailParse.pm 27 Apr 2003 02:57:12 -0000 1.119
***************
*** 408,422 ****
( ( $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;
--- 408,435 ----
( ( $tag =~ /^img|frame|iframe$/i )
|| ( $tag =~ /^script$/i && $parse_script_uri ) ) ) {
!
! # "CID:" links refer to an origin-controlled attachment to a html email.
! # Adding strings from these, even if they appear to be hostnames, may or
! # may not be beneficial
! if ($value =~ /^cid\:/i )
! {
! # TODO: Decide what to do here, ignoring CID's for now
!
! } else {
! 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;
***************
*** 485,489 ****
$attribute = lc( $attribute );
$self->update_pseudoword( 'html', "img$attribute$value" );
! }
# Font sizes
--- 498,502 ----
$attribute = lc( $attribute );
$self->update_pseudoword( 'html', "img$attribute$value" );
! }
# Font sizes
|