Mangled AAR header when srv_id is a suffix of some AR header fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkimpy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Here's an example of the generated AAR header from the existing AR header (produced by ARC.sign method):
ARC-Authenticat
dkim=pass header.d=test1.
spf=pass (sender IP is 127.0.0.1) <email address hidden> smtp.helo=
Authentication-
dmarc=pass (p=QUARANTINE sp=NONE) smtp.from=
dkim=pass header.
spf=pass (sender IP is 127.0.0.1) <email address hidden> smtp.helo=
Note that some semicolons are missing and trailing parts of header.from and header.d are missing as well. For the purposes of this result srv_id = b'10-69-
I believe this can be fixed by the following change in the library code:
- results_lists = [raw.replace(srv_id + b';', b'').strip() for (raw, parsed) in auth_headers]
+ results_lists = [raw.replace(srv_id + b';', b'', 1).strip() for (raw, parsed) in auth_headers]
Library version: dkimpy==1.1.5
Original API call:
r = arc.sign(
Changed in dkimpy: | |
status: | Expired → Incomplete |
It looks like this is OBE to your proposed change in #2052526, which I have applied. Please let me know if there's anything still needed for this bug?