commit a9fe8f9: [Minor] Do not treat ASiC files as pure archives

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jun 17 13:07:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-06-17 14:01:43 +0100
URL: https://github.com/rspamd/rspamd/commit/a9fe8f9048aeb62df8d0caffe67d35a197afeb26

[Minor] Do not treat ASiC files as pure archives
Issue: #3790
Closes: #3790

---
 lualib/lua_magic/heuristics.lua |  1 +
 lualib/lua_magic/types.lua      | 14 +++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

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',


More information about the Commits mailing list