Bugfix: DKIM checks fail

The DKIM key is base64 encoded, meaning it can end with "=" signs
Split on "=" and check if you have 2 'parts' (key and value) will fail in these cases.
By using split("=",1) we make sure we only slit on the first occurence of the "=" sign
This commit is contained in:
jammo-nl
2019-01-07 10:52:35 +01:00
committed by GitHub
parent e26dd51a81
commit 24e9534378
+1 -1
View File
@@ -200,7 +200,7 @@ def check_dkim_syntax(record):
key = None
for tag in record.split(";")[1:]:
tag = tag.strip(" ")
parts = tag.split("=")
parts = tag.split("=",1)
if len(parts) != 2:
raise DNSSyntaxError(_("Invalid tag {}").format(tag))
name = parts[0].strip(" ")