commit 34036d3: [Minor] Add .dwg files support

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Sep 23 11:21:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-23 12:13:54 +0100
URL: https://github.com/rspamd/rspamd/commit/34036d3776a2d7d45c45c41ec326451abf21f33e (HEAD -> master)

[Minor] Add .dwg files support

---
 lualib/lua_magic/patterns.lua | 7 +++++++
 lualib/lua_magic/types.lua    | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/lualib/lua_magic/patterns.lua b/lualib/lua_magic/patterns.lua
index 8f4bc4092..0b5e556d1 100644
--- a/lualib/lua_magic/patterns.lua
+++ b/lualib/lua_magic/patterns.lua
@@ -371,6 +371,13 @@ local patterns = {
       },
     }
   },
+  dwg = {
+    matches = {
+      string = 'AC10[12][2-9]',
+      position = 6,
+      weight = 60,
+    }
+  },
 }
 
 return patterns
\ No newline at end of file
diff --git a/lualib/lua_magic/types.lua b/lualib/lua_magic/types.lua
index 32c7cd131..2b2545d87 100644
--- a/lualib/lua_magic/types.lua
+++ b/lualib/lua_magic/types.lua
@@ -241,6 +241,10 @@ local types = {
     type = 'image',
     ct = 'image/bmp',
   },
+  dwg = {
+    type = 'image',
+    ct = 'image/vnd.dwg',
+  },
   -- Text
   txt = {
     type = 'text',


More information about the Commits mailing list