Fix byte casting issues & typos

This commit is contained in:
Gene Shuman
2017-03-01 16:48:32 -08:00
parent 7456fffcea
commit 4079b79abc
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -1,5 +1,6 @@
UNRELEASED Version 0.6.2
- Fixed python3.4 string interpolation issue
- Fix some byte casting issues & typos
2017-01-27 Version 0.6.1
- Fixed python3 dns lookup issue
+4 -4
View File
@@ -390,9 +390,9 @@ class DomainSigner(object):
SHOULD = (
b'sender', b'reply-to', b'subject', b'date', b'message-id', b'to', b'cc',
b'mime-version', b'content-type', b'content-transfer-encoding',
b'content-id', b'content- description', b'resent-date', b'resent-from',
b'content-id', b'content-description', b'resent-date', b'resent-from',
b'resent-sender', b'resent-to', b'resent-cc', b'resent-message-id',
b'in-reply-to', 'references', b'list-id', b'list-help', b'list-unsubscribe',
b'in-reply-to', b'references', b'list-id', b'list-help', b'list-unsubscribe',
b'list-subscribe', b'list-post', b'list-owner', b'list-archive'
)
@@ -656,7 +656,7 @@ class DKIM(DomainSigner):
(b'c', canon_policy.to_c_value()),
(b'd', domain),
(b'i', identity or b"@"+domain),
length and (b'l', len(body)),
length and (b'l', str(len(body)).encode('ascii')),
(b'q', b"dns/txt"),
(b's', selector),
(b't', str(int(time.time())).encode('ascii')),
@@ -810,7 +810,7 @@ class ARC(DomainSigner):
arc_headers = [y for x,y in arc_headers_w_instance]
# Compute ARC-Authentication-Results
aar_value = (b"i=%d; " % instance) + auth_results
aar_value = ("i=%d; " % instance).encode('utf-8') + auth_results
if aar_value[-1] != b'\n': aar_value += b'\r\n'
new_arc_set.append(b"ARC-Authentication-Results: " + aar_value)