[PATCH] Fix missing SHOULD header bytes representation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dkimpy |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This bug only occur with Python 3 (tested with 3.4).
`references` header field in DKIM.SHOULD is not represented as bytes.
Test that show bug:
```
def test_simple_
# A message verifies after being signed with SHOULD headers
for header_algo in (b"simple", b"relaxed"):
for body_algo in (b"simple", b"relaxed"):
sig = dkim.sign(
self.message, b"test", b"example.com", self.key,
canonical
include_
res = dkim.verify(sig + self.message, dnsfunc=
self.
```
=======
ERROR: test_simple_
-------
Traceback (most recent call last):
File "/home/
include_
File "/home/
return d.sign(selector, domain, privkey, identity=identity, canonicalize=
File "/home/
(b'h', b" : ".join(
TypeError: sequence item 20: expected a bytes-like object, str found
You can found this work on our github branch here:
https:/
The underlying issue was fixed in commit 134. Added the new test case based on your patch. Thanks. This will be in version 0.6.2.