On Mon, 17 Dec 2012, Mark Martinec wrote:
>>>> Illegal octal digit '8' ignored at
>>>> /usr/share/perl5/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
>>>> line 1083
> 
> This is more likely a bug 6336:
>  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6336
> 
> fixed in 3.3.2.

Oops, sorry, apparently the fix never made it entirely
into the 3.3, but is in the trunk.

The following patch to SA 3.3.2 is still needed as a fix to Bug 6336:

--- BodyRuleBaseExtractor.pm.orig       2011-06-07 01:59:17.000000000 +0200
+++ BodyRuleBaseExtractor.pm    2012-12-17 20:54:09.142190372 +0100
@@ -1072,5 +1072,5 @@
     }
     elsif ($tok eq '\\') {
-      $re =~ /\G(x\{[^\}]+\}|\d{1,3}|.)/gc or die "\\ at end of string!";
+      $re =~ /\G(x\{[^\}]+\}|[0-7]{1,3}|.)/gcs or die "\\ at end of string!";
       my $esc = $1;
       if ($esc eq '"') {
@@ -1078,7 +1078,7 @@
       } elsif ($esc eq '\\') {
         $output .= '"**BACKSLASH**"';   # avoid hairy escape-parsing
-      } elsif ($esc =~ /^x\{(\S+)\}$/) {
+      } elsif ($esc =~ /^x\{(\S+)\}\z/) {
         $output .= '"'.chr(hex($1)).'"';
-      } elsif ($esc =~ /^\d+/) {
+      } elsif ($esc =~ /^[0-7]{1,3}\z/) {
         $output .= '"'.chr(oct($esc)).'"';
       } else {


Btw, the above doesn't address the Bug 6649, which is still broken.

  Mark

Reply via email to