Author: quinlan
Date: Sat Apr 2 19:29:47 2005
New Revision: 159875
URL: http://svn.apache.org/viewcvs?view=rev&rev=159875
Log:
bug 4142, bug 4227: excessive work in regexps
Modified:
spamassassin/trunk/rules/20_body_tests.cf
spamassassin/trunk/rules/20_head_tests.cf
spamassassin/trunk/rules/20_ratware.cf
spamassassin/trunk/rules/20_uri_tests.cf
Modified: spamassassin/trunk/rules/20_body_tests.cf
URL:
http://svn.apache.org/viewcvs/spamassassin/trunk/rules/20_body_tests.cf?view=diff&r1=159874&r2=159875
==============================================================================
--- spamassassin/trunk/rules/20_body_tests.cf (original)
+++ spamassassin/trunk/rules/20_body_tests.cf Sat Apr 2 19:29:47 2005
@@ -91,7 +91,7 @@
# note: __HIGHBITS is used by HTML_CHARSET_FARAWAY
rawbody __MIME_CHARSET_FARAWAY eval:check_for_mime('mime_faraway_charset')
-body __HIGHBITS /(?:[\x80-\xff].?){4,}/
+body __HIGHBITS /(?:[\x80-\xff].?){4}/
meta MIME_CHARSET_FARAWAY (__MIME_CHARSET_FARAWAY && __HIGHBITS)
describe MIME_CHARSET_FARAWAY MIME character set indicates foreign language
tflags MIME_CHARSET_FARAWAY userconf
Modified: spamassassin/trunk/rules/20_head_tests.cf
URL:
http://svn.apache.org/viewcvs/spamassassin/trunk/rules/20_head_tests.cf?view=diff&r1=159874&r2=159875
==============================================================================
--- spamassassin/trunk/rules/20_head_tests.cf (original)
+++ spamassassin/trunk/rules/20_head_tests.cf Sat Apr 2 19:29:47 2005
@@ -445,7 +445,7 @@
header SORTED_RECIPS eval:sorted_recipients()
describe SORTED_RECIPS Recipient list is sorted by address
-header GAPPY_SUBJECT Subject =~ /\b(?:[a-z]([-_. =~\/:,[EMAIL
PROTECTED]&+;\"\'<>\\])\1{0,2}){4,}/i
+header GAPPY_SUBJECT Subject =~ /\b(?:[a-z]([-_. =~\/:,[EMAIL
PROTECTED]&+;\"\'<>\\])\1{0,2}){4}/i
describe GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
### header existence tests (description is added automatically)
@@ -500,7 +500,7 @@
header SUBJ_FOR_ONLY Subject =~ /For Only/i
describe SUBJ_FOR_ONLY Subject contains "For Only"
-header SUBJ_FREE_CAP Subject =~ /FRE{2,}|F.R.E.E\b/
+header SUBJ_FREE_CAP Subject =~ /FREE|F.R.E.E\b/
describe SUBJ_FREE_CAP Subject contains "FREE" in CAPS
header SUB_FREE_OFFER Subject =~ /^fre{2,}\b/i
Modified: spamassassin/trunk/rules/20_ratware.cf
URL:
http://svn.apache.org/viewcvs/spamassassin/trunk/rules/20_ratware.cf?view=diff&r1=159874&r2=159875
==============================================================================
--- spamassassin/trunk/rules/20_ratware.cf (original)
+++ spamassassin/trunk/rules/20_ratware.cf Sat Apr 2 19:29:47 2005
@@ -213,7 +213,7 @@
# filters.
#
# http://groups.google.com/groups?selm=atp1ip0n22%40enews3.newsguy.com
-rawbody RATWARE_HASH_DASH /[a-z\d]+-([a-z\d]{16}-)+[a-z\d]+(?-i:l)\d+/i
+rawbody RATWARE_HASH_DASH /[a-z\d]-[a-z\d]{16}-[a-z\d]{1,16}(?-i:l)\d/i
describe RATWARE_HASH_DASH Contains a hashbuster in Send-Safe format
# spammer tool, sometimes has "netIP with HTTP;" in Received: header
Modified: spamassassin/trunk/rules/20_uri_tests.cf
URL:
http://svn.apache.org/viewcvs/spamassassin/trunk/rules/20_uri_tests.cf?view=diff&r1=159874&r2=159875
==============================================================================
--- spamassassin/trunk/rules/20_uri_tests.cf (original)
+++ spamassassin/trunk/rules/20_uri_tests.cf Sat Apr 2 19:29:47 2005
@@ -24,7 +24,7 @@
require_version @@VERSION@@
-uri NUMERIC_HTTP_ADDR /^https?\:\/\/\d{7,}/is
+uri NUMERIC_HTTP_ADDR /^https?\:\/\/\d{7}/is
describe NUMERIC_HTTP_ADDR Uses a numeric IP address in URL
uri NORMAL_HTTP_TO_IP m{^https?://\d+\.\d+\.\d+\.\d+}i
@@ -89,7 +89,7 @@
#uri HTTP_ENTITIES_HOST m{https?://[^\s\">/]*\&\#[\da-f]+}i
#describe HTTP_ENTITIES_HOST URI obscured with character entities
-uri YAHOO_RD_REDIR
m{^https?\://rd\.yahoo\.com/(?:[0-9]{4,}|partner\b|dir\b)}i
+uri YAHOO_RD_REDIR
m{^https?\://rd\.yahoo\.com/(?:[0-9]{4}|partner\b|dir\b)}i
describe YAHOO_RD_REDIR Has Yahoo Redirect URI
uri YAHOO_DRS_REDIR m{^https?://drs\.yahoo\.com/}i
@@ -119,7 +119,7 @@
describe URI_REDIRECTOR Message has HTTP redirector URI
# a.com.b.c
-uri SPOOF_COM2OTH m{^https?://(?:\w+\.)+?com\.(?:\w+\.){2,}}i
+uri SPOOF_COM2OTH m{^https?://(?:\w+\.)+?com\.(?:\w+\.){2}}i
describe SPOOF_COM2OTH URI contains ".com" in middle
# a.com.b.com
@@ -156,7 +156,7 @@
uri URI_NO_WWW_BIZ_CGI
/^(?:https?:\/\/)?[^\/]+(?<!\/www)\.[^.]{7,}\.biz\/(?=\S{15,})\S*\?/i
describe URI_NO_WWW_BIZ_CGI CGI in .biz TLD other than third-level "www"
-uri URI_NO_WWW_ANY_CGI
/^(?:https?:\/\/)?[^\/]+(?<!\/www)\.[^.]{3,}\.[^.]{3,}\.(?!biz|info)[a-z]{2,4}\/\?\S{14,}/i
+uri URI_NO_WWW_ANY_CGI
/^(?:https?:\/\/)?[^\/]+(?<!\/www)\.[^.]{3,}\.[^.]{3,}\.(?!biz|info)[a-z]{2,4}\/\?\S{14}/i
describe URI_NO_WWW_ANY_CGI CGI with long hostname other fourth-level "www"
uri URI_SCHEME_MIXED_CASE /^(?![a-z]{3,6}:|[A-Z]{3,6})[A-Za-z]{3,6}:\//