https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7730

            Bug ID: 7730
           Summary: FROM_EXCESS_BASE64 is wrong
           Product: Spamassassin
           Version: 3.4.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Rules
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: Undefined

Imo this change (https://svn.apache.org/viewvc?view=revision&revision=1827613)
is a bug and a regression.

Current code:

header __FROM_NEEDS_MIME        From:name:raw =~
/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\xff]/
header __FROM_ENCODED_QP        From:raw =~ /=\?\S+\?Q\?/i
header __FROM_ENCODED_B64       From:raw =~ /=\?\S+\?B\?/i

meta FROM_EXCESS_BASE64         __FROM_ENCODED_B64 && !__FROM_NEEDS_MIME
describe FROM_EXCESS_BASE64 From: base64 encoded unnecessarily

Now, __FROM_NEEDS_MIME should not check :raw value. As I understand "encoded
unnecessarily" means it should check that the sender name contains
non-ascii/control characters after it is decoded. From:name:raw will check the
encoded base64 string and will never match.

So, it should be "From" or "From:name", but not "From:name:raw". Otherwise the
whole meta test does not make sense.

Here's an example of a header that hits the rule, but should not.

From: =?UTF-8?B?0JjQstCw0L0=?= <[email protected]>

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to