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.9.0~722^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=13ab4cf77a3870c11ff4665c73e48ee34c6b684f;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