spamassassin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzilla-dae...@bugzilla.spamassassin.org
Subject [Bug 6278] New: Break recursion on attempt to add _ADDEDHEADER_ into a header section
Date Thu, 07 Jan 2010 15:16:08 GMT
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6278

           Summary: Break recursion on attempt to add _ADDEDHEADER_ into a
                    header section
           Product: Spamassassin
           Version: 3.3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Libraries
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: Mark.Martinec@ijs.si


Created an attachment (id=4623)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4623)
proposed patch

With a change in Bug 6185    I introduced three new tags:
ADDEDHEADER, ADDEDHEADERHAM, ADDEDHEADER, which offer a clean way
to obtain all newly added header fields with a get_tag()  (useful
for some plugin, or to a caller of SpamAssassin through API).

There is however a tricky case if someone (out of curiosity or
experimentation) tries to include them recursively with the add_header
configuration directive, i.e. include a header which itself contains
all included headers, which leads to an infinite recursion.

A nice way to resolve this would be to somehow pass-on the set of
tags that get_tag is currently working on (recursively). This would
probably need adding another argument to _get_tag, _get_added_fields,
_process_header and the _replace_tag, which looks like an excessive
change for a case which never occurs in practice.

To keep it simple, I decided to choose a pragmatic approach and just
prevent these three tags from getting expanded by _replace_tag.
The patch is pretty simple and unintrusive, so I believe it should
go into the 3.3.0.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message