spamassassin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 6278] New: Break recursion on attempt to add _ADDEDHEADER_ into a header section
Date Thu, 07 Jan 2010 15:16:08 GMT

           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

Created an attachment (id=4623)
 --> (
proposed patch

With a change in Bug 6185    I introduced three new tags:
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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message