You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2004/02/17 00:18:41 UTC

svn commit: rev 6696 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin rules

Author: quinlan
Date: Mon Feb 16 15:18:40 2004
New Revision: 6696

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
   incubator/spamassassin/trunk/rules/20_html_tests.cf
   incubator/spamassassin/trunk/rules/70_testing.cf
Log:
promote T_HTML_FONT_TINY


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	Mon Feb 16 15:18:40 2004
@@ -631,10 +631,11 @@
     }
   }
   if ($tag eq "font" && exists $attr->{size}) {
-    $self->{html}{t_tiny_font} = 1 if (($attr->{size} =~ /^\s*(\d+)/ && $1 < 1) ||
-			    ($attr->{size} =~ /\-(\d+)/ && $1 >= 3));
-    $self->{html}{big_font} = 1 if (($attr->{size} =~ /^\s*(\d+)/ && $1 > 3) ||
-			    ($attr->{size} =~ /\+(\d+)/ && $1 >= 1));
+    $size = $size;
+    $self->{html}{tiny_font} = 1 if (($size =~ /^\s*(\d+)/ && $1 < 1) ||
+				     ($size =~ /\-(\d+)/ && $1 >= 3));
+    $self->{html}{big_font} = 1 if (($size =~ /^\s*(\d+)/ && $1 > 3) ||
+				    ($size =~ /\+(\d+)/ && $1 >= 1));
   }
   if ($tag eq "font" && exists $attr->{color}) {
     my $bg = $self->{bgcolor_color}[-1];
@@ -780,8 +781,8 @@
 sub examine_text_style {
   my ($self, $size, $type) = @_;
   $type = lc $type;
-  $self->{html}{t_tiny_font} = 1 if ($type eq "pt" && $size < 4);
-  $self->{html}{t_tiny_font} = 1 if ($type eq "pt" && $size < 4);
+  $self->{html}{tiny_font} = 1 if ($type eq "pt" && $size < 4);
+  $self->{html}{tiny_font} = 1 if ($type eq "pt" && $size < 4);
   $self->{html}{big_font} = 1 if ($type eq "pt" && $size > 14);
   $self->{html}{big_font} = 1 if ($type eq "px" && $size > 18);
 }

Modified: incubator/spamassassin/trunk/rules/20_html_tests.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/20_html_tests.cf	(original)
+++ incubator/spamassassin/trunk/rules/20_html_tests.cf	Mon Feb 16 15:18:40 2004
@@ -107,6 +107,9 @@
 body HTML_FONT_BIG		eval:html_test('big_font')
 describe HTML_FONT_BIG		HTML has a big font
 
+body HTML_FONT_TINY		eval:html_test('tiny_font')
+describe HTML_FONT_TINY		HTML has a tiny font
+
 body HTML_FONTCOLOR_UNSAFE	eval:html_test('font_color_unsafe')
 describe HTML_FONTCOLOR_UNSAFE	HTML font color not in safe 6x6x6 palette
 

Modified: incubator/spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_testing.cf	(original)
+++ incubator/spamassassin/trunk/rules/70_testing.cf	Mon Feb 16 15:18:40 2004
@@ -310,10 +310,6 @@
 header T_RE_UC_3WORDS	Subject =~ /^[rR][eE]: [A-Z]{3,12},(?:\s[A-Z][a-z]+){3}$/
 describe T_RE_UC_3WORDS	Has Subject in form "Re: UPPERCASE, word word word"
 
-# Spammers are now attempting to use tiny font sizes to hide hashbusters
-body T_HTML_FONT_TINY		eval:html_test('t_tiny_font')
-describe T_HTML_FONT_TINY	HTML has a tiny font
-
 # more portable replacement for RCVD_NUMERIC_HELO that doesn't rely on
 # Received headers using "helo=" prefix
 header T_RCVD_NUMERIC_HELO	X-Spam-Relays-Untrusted =~ / helo=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} /