From: Vsevolod Stakhov Date: Sat, 29 Jul 2017 15:22:46 +0000 (+0100) Subject: [Minor] Some more minor fixes to lua X-Git-Tag: 1.6.4~22^2~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e4408ee1d15eacd3d106fc5f6c68521f4e3c91c5;p=rspamd.git [Minor] Some more minor fixes to lua Conflicts: src/plugins/lua/fann_redis.lua --- diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua index 2e4bae307..25cb263ff 100644 --- a/rules/headers_checks.lua +++ b/rules/headers_checks.lua @@ -920,15 +920,12 @@ rspamd_config.CTYPE_MIXED_BOGUS = { local found = false -- Check each part and look for a part that isn't multipart/* or text/plain or text/html for _,p in ipairs(parts) do - local ct = p:get_header('Content-Type') - if (ct) then - ct = ct:lower() - if (ct:match('^multipart/') or - ct:match('^text/plain') or - ct:match('^text/html')) - then - -- Nothing - else + local pct = p:get_header('Content-Type') + if (pct) then + pct = pct:lower() + if not ((pct:match('^multipart/') or + pct:match('^text/plain') or + pct:match('^text/html'))) then found = true end end