spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r280739 - in /spamassassin/branches/3.1: lib/Mail/SpamAssassin/PerMsgStatus.pm t/uri_text.t
Date Wed, 14 Sep 2005 01:53:41 GMT
Author: jm
Date: Tue Sep 13 18:53:39 2005
New Revision: 280739

URL: http://svn.apache.org/viewcvs?rev=280739&view=rev
Log:
bug 4522: ISO-2022 charset shifting escape sequence threw off bare-URI parsing.  fixed

Modified:
    spamassassin/branches/3.1/lib/Mail/SpamAssassin/PerMsgStatus.pm
    spamassassin/branches/3.1/t/uri_text.t

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/PerMsgStatus.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/PerMsgStatus.pm?rev=280739&r1=280738&r2=280739&view=diff
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/PerMsgStatus.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/PerMsgStatus.pm Tue Sep 13 18:53:39 2005
@@ -1802,7 +1802,7 @@
 # Taken from URI and URI::Find
 my $reserved   = q(;/?:@&=+$,[]\#|);
 my $mark       = q(-_.!~*'());                                    #'; emacs
-my $unreserved = "A-Za-z0-9\Q$mark\E\x00-\x08\x0b\x0c\x0e-\x1f";
+my $unreserved = "A-Za-z0-9\Q$mark\E\x00-\x08\x0b\x0c\x0e-\x1a\x1c-\x1f";
 my $uricSet = quotemeta($reserved) . $unreserved . "%";
 
 my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/i;

Modified: spamassassin/branches/3.1/t/uri_text.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/uri_text.t?rev=280739&r1=280738&r2=280739&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/uri_text.t (original)
+++ spamassassin/branches/3.1/t/uri_text.t Tue Sep 13 18:53:39 2005
@@ -24,7 +24,7 @@
 use vars qw(%patterns %anti_patterns);
 
 # settings
-plan tests => 101;
+plan tests => 104;
 
 # initialize SpamAssassin
 my $sa = create_saobj({'dont_copy_prefs' => 1});
@@ -83,6 +83,7 @@
       my $string = $1;
       my @patterns = split(' ', $2);
       if ($string && @patterns) {
+        $string =~ s/{ESC}/\x1b/gs;     # magic, to avoid ^[ chars in source
         $message .= "$string\n";
         for my $pattern (@patterns) {
           if ($pattern =~ /^\!(.*)/) {
@@ -259,4 +260,8 @@
 
 <sentto-4934-foo=addr.com@verper.com>	!^http://.*addr.com@verper.com
 <sentto-4934-foo=addr.com@verper.com>	mailto:sentto-4934-foo=addr.com@verper.com
+
+http://foo23498.com/{ESC}(B	^http://foo23498.com/$
+{ESC}(Bhttp://foo23499.com/	^http://foo23499.com/$
+http://foo23500.com{ESC}(B/	^http://foo23500.com$
 



Mime
View raw message