This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 1f86b3c Fix a lid encoding issue
new 8903403 Merge pull request #33 from sbp/dkim-id-lid-bytes
1f86b3c is described below
commit 1f86b3ca293b478a691ea1746eca39192fe7c256
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Jun 3 10:09:48 2021 +0100
Fix a lid encoding issue
---
tools/plugins/generators.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/plugins/generators.py b/tools/plugins/generators.py
index 1206747..6363d3d 100644
--- a/tools/plugins/generators.py
+++ b/tools/plugins/generators.py
@@ -50,6 +50,8 @@ def dkimid(_msg, _body, lid, _attachments, raw_msg):
>>> dkimid(None, None, None, None, b"")
'8fgp2do75oqo6qd08vs4p7dpp1gj4vjn'
"""
+ if isinstance(lid, str):
+ lid = lid.encode("utf-8", errors="replace")
return dkim_id.dkim_id(raw_msg, lid)