From: eneq123 Date: Thu, 12 Feb 2015 20:18:29 +0000 (+0300) Subject: fix: attempt to index field '?' (a nil value) X-Git-Tag: 0.8.2~48^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=731a2954b73d7f6f23d4d01d6fabc3969de73936;p=rspamd.git fix: attempt to index field '?' (a nil value) --- diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index 44cd6994a..2fea63eae 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -38,7 +38,7 @@ function check_forged_headers(task) local smtp_from = task:get_from(1) if smtp_from then local mime_from = task:get_from(2) - if not mime_from or not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then + if not mime_from or not mime_from[1] or not (string.lower(mime_from[1]['addr']) == string.lower(smtp_from[1]['addr'])) then task:insert_result(symbol_sender, 1) end end