From: Vsevolod Stakhov Date: Sun, 13 Mar 2022 16:14:49 +0000 (+0000) Subject: [Minor] Fix detection for some csv cases X-Git-Tag: 3.2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4804292ed27b0c7339d31ad007cb64d1a3601da7;p=thirdparty%2Frspamd.git [Minor] Fix detection for some csv cases --- diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 7eae38ffc7..8f287acbf5 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()