]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] DKIM Signing: avoid nil index when From header is missing
authorAndrew Lewis <nerf@judo.za.org>
Thu, 4 May 2017 15:16:52 +0000 (17:16 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 4 May 2017 15:18:34 +0000 (17:18 +0200)
src/plugins/lua/dkim_signing.lua

index 4843146a71af7690478147cbca0eb2b2a5e84a95..974f227873451dc75576171027e806d081611b22 100644 (file)
@@ -79,7 +79,7 @@ local function dkim_signing_cb(task)
     return false
   end
   local hfrom = task:get_from('mime')
-  if not settings.allow_hdrfrom_multiple and hfrom[2] then
+  if not settings.allow_hdrfrom_multiple and (hfrom or E)[2] then
     rspamd_logger.debugm(N, task, 'multiple header from not allowed')
     return false
   end