You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2019/07/01 13:58:02 UTC

[Bug 7730] New: FROM_EXCESS_BASE64 is wrong

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: dev@spamassassin.apache.org
          Reporter: machniak@kolabsys.com
  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=?= <no...@test.com>

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

[Bug 7730] FROM_EXCESS_BASE64 is wrong

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7730

RW <rw...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwmaillists@googlemail.com

--- Comment #1 from RW <rw...@googlemail.com> ---

It depends on the intended meaning of __FROM_NEEDS_MIME, whether it means:

A) the From header contains non-ASCII characters that should have been mime
encoded.
B) the From header has been mime encoded and the encoding is needed.

I'd assumed A from the name, as presumably did the committer of revision
1827613, and I think that's the idea in  __KHOP_NO_FULL_NAME too.

In that case  __FROM_NEEDS_MIME is being used inappropriately in
FROM_EXCESS_BASE64.

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

[Bug 7730] FROM_EXCESS_BASE64 is wrong

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7730

Henrik Krohns <ap...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@hege.li
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Henrik Krohns <ap...@hege.li> ---
Tested with local corpus and From:name improves S/O slightly.

Yes the namings are quite horrible, but not wasting any more time on thinking
about it.

Sending        rules/20_head_tests.cf
Transmitting file data .done
Committing transaction...
Committed revision 1867568.

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