diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-11-20 11:23:04 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-11-20 11:24:17 +0000 |
commit | f22fd35fc8650db2db4a75400184130ec2beae49 (patch) | |
tree | ed88b3a98d63d72f40dde363e97a0e040978fa37 /lualib/lua_magic | |
parent | b163ba4b7256c089382148092e0bab8792ead3a4 (diff) | |
download | rspamd-f22fd35fc8650db2db4a75400184130ec2beae49.tar.gz rspamd-f22fd35fc8650db2db4a75400184130ec2beae49.zip |
[Minor] Lua_magic: Do not treat by default non-text part as text
Diffstat (limited to 'lualib/lua_magic')
-rw-r--r-- | lualib/lua_magic/heuristics.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 02bc2b4a2..a0efdf50f 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -446,6 +446,11 @@ exports.text_part_heuristic = function(part, log_obj, _) return 'html',21 end + if mtype ~= 'text' then + -- Do not treat non text patterns as text + return nil + end + return 'txt',40 end end |