diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-07-29 16:22:46 +0100 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-08-28 13:45:22 +0200 |
commit | e4408ee1d15eacd3d106fc5f6c68521f4e3c91c5 (patch) | |
tree | 62e5fb8438779f2cfa715342a041e9f837d99853 /rules | |
parent | e0f0176eec5a4ce25ac56a45f48eb203a36ddf86 (diff) | |
download | rspamd-e4408ee1d15eacd3d106fc5f6c68521f4e3c91c5.tar.gz rspamd-e4408ee1d15eacd3d106fc5f6c68521f4e3c91c5.zip |
[Minor] Some more minor fixes to lua
Conflicts:
src/plugins/lua/fann_redis.lua
Diffstat (limited to 'rules')
-rw-r--r-- | rules/headers_checks.lua | 15 |
1 files changed, 6 insertions, 9 deletions
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 |