From 24e9534378492b67804339007417f3a95462a69b Mon Sep 17 00:00:00 2001 From: jammo-nl <46375984+jammo-nl@users.noreply.github.com> Date: Mon, 7 Jan 2019 10:52:35 +0100 Subject: [PATCH] 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 --- modoboa/dnstools/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/dnstools/lib.py b/modoboa/dnstools/lib.py index 6a7e70b07..1797b763b 100644 --- a/modoboa/dnstools/lib.py +++ b/modoboa/dnstools/lib.py @@ -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(" ")