https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7050

            Bug ID: 7050
           Summary: Template Tag _DATE_ broken,
                    M::SA::Util::time_to_rfc822_date() affected
           Product: Spamassassin
           Version: 3.4.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: [email protected]
          Reporter: [email protected]

As reported on the users lists, the Template Tag _DATE_ is broken since the
3.4.0 release, resulting in false date strings. To reproduce:

  add_header all Date _DATE_

This bug was introduced by revision 1453407, bug 6915. The optimization
requires passing an extra $pms argument to the anonymous subs in
PerMsgStatus.pm BEGIN block.

Using a function reference like done for VERSION works only, if the referenced
function does not expect arguments. It breaks in the case of DATE.

  DATE => \&Mail::SpamAssassin::Util::time_to_rfc822_date,

The M::SA::Util::time_to_rfc822_date() function takes an optional argument as
time to use instead of now. (Supported, though not used in SA.)

The fix is to use an anonymous sub, calling time_to_rfc822_date() explicitly
without any argument.

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

Reply via email to