From: Vsevolod Stakhov Date: Fri, 13 Aug 2021 13:00:35 +0000 (+0100) Subject: [Minor] Lua_magic: Fix xml detection X-Git-Tag: 3.0~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=872247289f842303f7a989298423179715a6f1bb;p=rspamd.git [Minor] Lua_magic: Fix xml detection --- diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index d3469e2f9..2571346b4 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -63,15 +63,15 @@ local zip_patterns = { local txt_trie local txt_patterns = { html = { - {[[(?i)\s*]], 31}, + } } -- Used to match pattern index and extension diff --git a/lualib/lua_magic/types.lua b/lualib/lua_magic/types.lua index 9f64b12a2..f082a53e5 100644 --- a/lualib/lua_magic/types.lua +++ b/lualib/lua_magic/types.lua @@ -284,6 +284,10 @@ local types = { ct = 'image/vnd.dwg', }, -- Text + xml = { + ct = 'application/xml', + type = 'text', + }, txt = { type = 'text', ct = 'text/plain',