Bug 6968 - Bleadperl v5.19.2-257-gc30fc27 fixes a bug in perl which Mail/SpamAssassin/Plugin/FreeMail.pm relies
Summary: Bleadperl v5.19.2-257-gc30fc27 fixes a bug in perl which Mail/SpamAssassin/Pl...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: 3.3.2
Hardware: PC Linux
: P2 normal
Target Milestone: 3.4.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 13:02 UTC by Andreas K
Modified: 2013-08-16 01:48 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas K 2013-08-15 13:02:42 UTC
As per subject. The relevant ticket where this fact was discovered is https://rt.perl.org/rt3//Public/Bug/Display.html?id=119125

The patch to fix the problem for both old and new perls is:

--- lib/Mail/SpamAssassin/Plugin/FreeMail.pm~   2011-06-07 01:59:17.000000000 +0200
+++ lib/Mail/SpamAssassin/Plugin/FreeMail.pm    2013-08-15 14:46:28.236376372 +0200
@@ -120,10 +120,10 @@
 # full email regex
 my $email_regex = qr/
   (?=.{0,64}\@)                                # limit userpart to 64 chars (and speed up searching?)
-  (?<![a-z0-9!#$%&'*+\/=?^_`{|}~-])    # start boundary
+  (?<![a-z0-9!#\$%&'*+\/=?^_`{|}~-])   # start boundary
   (                                    # capture email
-  [a-z0-9!#$%&'*+\/=?^_`{|}~-]+                # no dot in beginning
-  (?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)* # no consecutive dots, no ending dot
+  [a-z0-9!#\$%&'*+\/=?^_`{|}~-]+               # no dot in beginning
+  (?:\.[a-z0-9!#\$%&'*+\/=?^_`{|}~-]+)*        # no consecutive dots, no ending dot
   \@
   (?:[a-z0-9](?:[a-z0-9-]{0,59}[a-z0-9])?\.){1,4} # max 4x61 char parts (should be enough?)
   ${tlds}                              # ends with valid tld


Note that the change has no effect on current tests.

HTH && Regards,
Comment 1 Mark Martinec 2013-08-15 22:54:39 UTC
Great catch, thanks for letting us know!
The fix will be in 3.4.0.

trunk:
  Bug 6968: quote a $ within a character class
  (Bleadperl v5.19.2-257-gc30fc27 fixes a bug in perl
   which Mail/SpamAssassin/Plugin/FreeMail.pm relies)
Sending lib/Mail/SpamAssassin/Plugin/FreeMail.pm
Committed revision 1514524.
Comment 2 Karsten Bräckelmann 2013-08-16 01:48:11 UTC
(In reply to Mark Martinec from comment #1)
> Great catch, thanks for letting us know!
> The fix will be in 3.4.0.

> Committed revision 1514524.

That renders it RESOLVED FIXED.