commit 33b3dd9: [Fix] dkim_signing: siging_table: lowercase before lookup

Andrew Lewis nerf at judo.za.org
Mon Jul 29 17:49:24 UTC 2024


Author: Andrew Lewis
Date: 2023-11-29 14:32:06 +0200
URL: https://github.com/rspamd/rspamd/commit/33b3dd9a1b26397504c579d8eafb4f29053f50e0 (refs/pull/4717/head)

[Fix] dkim_signing: siging_table: lowercase before lookup

---
 lualib/lua_dkim_tools.lua                    | 2 +-
 test/functional/messages/dmarc/fail_none.eml | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua
index 1f396fbc4..165ea8f56 100644
--- a/lualib/lua_dkim_tools.lua
+++ b/lualib/lua_dkim_tools.lua
@@ -268,7 +268,7 @@ local function prepare_dkim_signing(N, task, settings)
           'signing_table: cannot get data when no header from is presented')
       return false, {}
     end
-    local sign_entry = settings.signing_table:get_key(hfrom[1].addr)
+    local sign_entry = settings.signing_table:get_key(hfrom[1].addr:lower())
 
     if sign_entry then
       -- Check opendkim style entries
diff --git a/test/functional/messages/dmarc/fail_none.eml b/test/functional/messages/dmarc/fail_none.eml
index 7fbff7738..159f1f5bb 100644
--- a/test/functional/messages/dmarc/fail_none.eml
+++ b/test/functional/messages/dmarc/fail_none.eml
@@ -1,3 +1,3 @@
-From: Rspamd <foo at cacophony.za.org>
-
-hello
+From: Rspamd <foo at caCophony.za.org>
+
+hello


More information about the Commits mailing list