]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix empty table check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 27 Feb 2021 23:05:35 +0000 (23:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 27 Feb 2021 23:05:35 +0000 (23:05 +0000)
lualib/lua_mime.lua

index 5b1c857e9d273a8fe02768557e9142f341759e9a..d94335f5b78b6b91cd8ba775ff4d87b92923e827 100644 (file)
@@ -535,6 +535,9 @@ exports.modify_headers = function(task, hdr_alterations)
     if not hdr_flattened[hname] then
       hdr_flattened[hname] = {remove = {}}
     end
+    if not hdr_flattened[hname].remove then
+      hdr_flattened[hname].remove = {}
+    end
     local remove_tbl = hdr_flattened[hname].remove
     if type(hdr) == 'number' then
       table.insert(remove_tbl, hdr)