aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-08-20 20:51:23 +0100
committerGitHub <noreply@github.com>2020-08-20 20:51:23 +0100
commit85acd8afd9d4a38586c6c908dd30c8eb86758fce (patch)
tree2cc7df37e50863c931198b6a07ac0c83e1dad5e0
parentb95a54eb684b318c37b1b108a94a6cbb721cf902 (diff)
parentd8c76f9fcb23fc62db8fc539db4736dfaedb11f8 (diff)
downloadrspamd-85acd8afd9d4a38586c6c908dd30c8eb86758fce.tar.gz
rspamd-85acd8afd9d4a38586c6c908dd30c8eb86758fce.zip
Merge pull request #3477 from citrin/lua-magic-html
[Minor] Improve lua_magic HTML content type check
-rw-r--r--lualib/lua_magic/heuristics.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index 8c63cce72..d36b5633f 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -434,7 +434,7 @@ exports.text_part_heuristic = function(part, log_obj, _)
end
end
- if mtype == 'text' and (msubtype == 'html' or msubtype == 'htm') then
+ if (mtype == 'text' or mtype == 'application') and (msubtype == 'html' or msubtype == 'xhtml+xml') then
return 'html',21
end
@@ -458,4 +458,4 @@ exports.pdf_format_heuristic = function(input, log_obj, pos, part)
return 'pdf',weight
end
-return exports \ No newline at end of file
+return exports