]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix dkim signing from HTTP headers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Sep 2018 16:24:19 +0000 (17:24 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Sep 2018 16:24:19 +0000 (17:24 +0100)
lualib/lua_dkim_tools.lua
src/plugins/lua/arc.lua
src/plugins/lua/dkim_signing.lua

index 5ea3f68bf5901273198c688853cc355303f22751..7b0852d4953a84cde91505982c645ff27143b35b 100644 (file)
@@ -56,9 +56,9 @@ local function parse_dkim_http_headers(N, task, settings)
     end
 
     return true,{
-      rawkey = key,
-      domain = domain,
-      selector = selector
+      rawkey = tostring(key),
+      domain = tostring(domain),
+      selector = tostring(selector)
     }
   end
 
index 53fb7466a60c2fd60164ee2efb2285c9b1ad39e9..9d3f79675ad2b80ad81b10a542a4155dbd55ac1c 100644 (file)
@@ -589,8 +589,12 @@ for k,v in pairs(opts) do
     settings[k] = v
   end
 end
-if not (settings.use_redis or settings.path or
-    settings.domain or settings.path_map or settings.selector_map) then
+if not (settings.use_redis or
+    settings.path or
+    settings.domain or
+    settings.path_map or
+    settings.selector_map or
+    settings.use_http_headers) then
   rspamd_logger.infox(rspamd_config, 'mandatory parameters missing, disable arc signing')
   lua_util.disable_module(N, "fail")
   return
index f2d527a70968e845c13057bf2d7e700fbf381b7b..0913b14a3a1dcacfebbe224f780c13724d9573c0 100644 (file)
@@ -193,7 +193,12 @@ for k,v in pairs(opts) do
     settings[k] = v
   end
 end
-if not (settings.use_redis or settings.path or settings.domain or settings.path_map or settings.selector_map) then
+if not (settings.use_redis or
+    settings.path or
+    settings.domain or
+    settings.path_map or
+    settings.selector_map or
+    settings.use_http_headers) then
   rspamd_logger.infox(rspamd_config, 'mandatory parameters missing, disable dkim signing')
   lua_util.disable_module(N, "config")
   return