From: Vsevolod Stakhov Date: Thu, 17 Jun 2021 13:01:43 +0000 (+0100) Subject: [Minor] Do not treat ASiC files as pure archives X-Git-Tag: 3.0~285 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9fe8f9048aeb62df8d0caffe67d35a197afeb26;p=rspamd.git [Minor] Do not treat ASiC files as pure archives Issue: #3790 Closes: #3790 --- diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua index 01fa046c0..4943d5392 100644 --- a/lualib/lua_magic/heuristics.lua +++ b/lualib/lua_magic/heuristics.lua @@ -57,6 +57,7 @@ local zip_patterns = { odp = {[[mimetypeapplication/vnd\.oasis\.opendocument\.presentation]]}, epub = {[[epub\+zip]]}, asice = {[[mimetypeapplication/vnd\.etsi\.asic-e\+zipPK]]}, + asics = {[[mimetypeapplication/vnd\.etsi\.asic-s\+zipPK]]}, } local txt_trie diff --git a/lualib/lua_magic/types.lua b/lualib/lua_magic/types.lua index 5ab50d9bc..9f64b12a2 100644 --- a/lualib/lua_magic/types.lua +++ b/lualib/lua_magic/types.lua @@ -125,11 +125,6 @@ local types = { ct = 'application/x-alz', type = 'archive', }, - -- https://en.wikipedia.org/wiki/Associated_Signature_Containers - asice = { - ct = 'application/vnd.etsi.asic-e+zip', - type = 'archive' - }, xar = { ct = 'application/x-xar', type = 'archive', @@ -227,6 +222,15 @@ local types = { ct = 'application/vnd.oasis.opendocument.presentation', type = 'office' }, + -- https://en.wikipedia.org/wiki/Associated_Signature_Containers + asice = { + ct = 'application/vnd.etsi.asic-e+zip', + type = 'office' + }, + asics = { + ct = 'application/vnd.etsi.asic-s+zip', + type = 'office' + }, -- other pgp = { ct = 'application/encrypted',