diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-04-25 22:37:06 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-04-25 22:37:06 +0100 |
commit | 017040605f9d14a94d86b9b676dd512ce65d2d1b (patch) | |
tree | 6d9383bfcddb84f1708b370088300a4fefad29b0 /src | |
parent | 0a0e3f35c814b9dcc81928c383ed7f39e8904e61 (diff) | |
download | rspamd-017040605f9d14a94d86b9b676dd512ce65d2d1b.tar.gz rspamd-017040605f9d14a94d86b9b676dd512ce65d2d1b.zip |
[Minor] Use utf8 compatible comparison
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/forged_recipients.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index a0fcd09ec..4b8e720c3 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -30,6 +30,7 @@ end local symbol_rcpt = 'FORGED_RECIPIENTS' local symbol_sender = 'FORGED_SENDER' +local rspamd_util = require "rspamd_util" local E = {} @@ -141,7 +142,7 @@ local function check_forged_headers(task) if smtp_from and smtp_from[1] and smtp_from[1]['addr'] ~= '' then local mime_from = task:get_from(2) if not mime_from or not mime_from[1] or - (string.lower(mime_from[1]['addr']) ~= string.lower(smtp_from[1]['addr'])) then + not rspamd_util.strequal_caseless_utf8(mime_from[1]['addr'], smtp_from[1]['addr']) then task:insert_result(symbol_sender, 1, ((mime_from or E)[1] or E).addr or '', smtp_from[1].addr) end end |