ARC sign "AuthenticationResultsHeader.parse" should not be responsible for invalid headers

Bug #1884044 reported by Cyril N.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy
Fix Released
Medium
Unassigned

Bug Description

Hi,

Sorry if the title is misleading, I couldn't find a proper way to explain the situation:

In some case, we receive an email that already contains a "Authentication-Results" that is wrongly formatted, like this (for debugging and help):

> Authentication-Results: mx3-fra-sp1.mta.salesforce.com x-tls.subject="/C=US/ST=California/L=San Francisco/O=salesforce.com, inc./OU=0:app;1:fra;2:fra-sp1;3:eu26;4:prod/CN=eu26-app1-23-fra.ops.sfdc.net"; auth=pass (cipher=ECDHE-RSA-AES256-GCM-SHA384)

or this :

> {redacted}.com; dkim=none (message not signed) header.d=none;{redacted}.com; dmarc=none action=none header.from={redacted-2}.com

(notice the header.d=none;domain.com)

In this case, the method ARC.sign (around line 953) will throw an error at :

```
grouped_headers = [(res, AuthenticationResultsHeader.parse('Authentication-Results: ' + res.decode('utf-8')))
                       for res in ar_headers]
```

Because that header is invalid.

I believe that in this case, it should just be ignored. If this header is needed, the `auth_headers` will then be empty and no ARC seal will be generated.

Otherwise, and this is the case here, the invalid AR header will be ignored, but ours, which is valid, will still be included and work as intended with a generated ARC signature.

Hope this makes sense.

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

It does make sense. Thanks.

Changed in dkimpy:
importance: Undecided → Medium
status: New → Triaged
Changed in dkimpy:
milestone: none → 1.0.5
Revision history for this message
Scott Kitterman (kitterman) wrote :

Since this will be a change in behavior, I'm going to hold changing this until the next feature release.

Changed in dkimpy:
milestone: 1.0.5 → 1.1.0
Changed in dkimpy:
status: Triaged → Fix Committed
Changed in dkimpy:
status: Fix Committed → Fix Released
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.