diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-13 16:14:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-13 16:14:49 +0000 |
commit | 4804292ed27b0c7339d31ad007cb64d1a3601da7 (patch) | |
tree | e1cdec65c5f6b91405162c1e54c59cc466cdadf3 /lualib/lua_magic | |
parent | 7dfe495e68efc52559f9459d87d303ec505eb833 (diff) | |
download | rspamd-4804292ed27b0c7339d31ad007cb64d1a3601da7.tar.gz rspamd-4804292ed27b0c7339d31ad007cb64d1a3601da7.zip |
[Minor] Fix detection for some csv cases
Diffstat (limited to 'lualib/lua_magic')
-rw-r--r-- | lualib/lua_magic/heuristics.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 7eae38ffc..8f287acbf 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -529,6 +529,12 @@ exports.text_part_heuristic = function(part, log_obj, _) return 'html', 21 end + if msubtype:lower() == 'csv' then + if validate_csv(part, content, log_obj) then + return 'csv', 40 + end + end + -- Extension stuff local function has_extension(file, ext) local ext_len = ext:len() |