]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] lua_scanners - icap check empty key 2736/head
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Sat, 26 Jan 2019 12:49:02 +0000 (13:49 +0100)
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>
Sat, 26 Jan 2019 12:49:02 +0000 (13:49 +0100)
lualib/lua_scanners/icap.lua

index 801db72f667244a56db80817fb5d077ec99a9e37..6ddd5fee660d7bcb2dec33fec8155a03313cf690 100644 (file)
@@ -69,7 +69,9 @@ local function icap_check(task, content, digest, rule)
         end
         if string.find(s, '[%a%d-+]-:') then
           local _,_,key,value = tostring(s):find("([%a%d-+]-):%s?(.+)")
-          icap_headers[key] = value
+          if key ~= nil then
+            icap_headers[key] = value
+          end
         end
       end
       lua_util.debugm(rule.name, task, '%s: icap_headers: %s',