Mixup between SPF reason and identity field

Bug #1822685 reported by Laurent Bigonville
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SPF Engine
Fix Released
High
Scott Kitterman

Bug Description

Hello

In the code, I can see the following comment:

    '''Data structure for results is a list of:
        [0] SPF result
        [1] SPF reason
        [2] Identity (HELO/Mail From)
        [3] Action based on local policy
        [4] Header
        [5] last_action (need to know if we've prepended already)'''

But multiple time later in the code, the position in the array is not respected:

For example:

            if helo_result[0] == 'None':
                helo_result[2] = "no SPF record"

(should be helo_result[1] otherwise the identity field is replaced by the comment)

or
                        header = 'Received-SPF: '+ mfrom_result[0] + ' (' + mfrom_result[2] +') ' + spfDetail

Here, mfrom_result[2] should be mfrom_result[1]

Revision history for this message
Scott Kitterman (kitterman) wrote :

Sorry, commented on the wrong bug.

Changed in spf-engine:
importance: Undecided → Medium
status: New → Triaged
importance: Medium → High
Changed in spf-engine:
milestone: none → 2.9.1
Changed in spf-engine:
status: Triaged → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

--- 2.9.1 (2019-10-06)
  * Use /run instead of /var/run
  * Fix-up sysv init so it works
  * Catch pyspf tracebacks so at least we don't die (thanks to Adi Pircalabu
    for both the report and the suggested fix) (LP: #1842005)
  * Correct over-writing of SPF identity by SPF reason for HELO checks and the
    reverse for Mail From (LP: #1822685)

Changed in spf-engine:
status: Fix Committed → Fix Released
assignee: nobody → Scott Kitterman (kitterman)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.