commit d6ea209: [Minor] Be more strict when checking for text parts

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Oct 7 10:49:07 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-10-07 11:45:43 +0100
URL: https://github.com/rspamd/rspamd/commit/d6ea2092cd8f925c62798c5e473bb6c4467c3965 (HEAD -> master)

[Minor] Be more strict when checking for text parts

---
 lualib/lua_magic/heuristics.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index fb105932a..306b3e188 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -336,7 +336,7 @@ exports.text_part_heuristic = function(part, log_obj)
     end
     lua_util.debugm(N, log_obj, "text part check: %s printable, %s non-printable, %s total",
         tlen - non_printable, non_printable, tlen)
-    if non_printable / tlen > 0.0625 then
+    if non_printable / tlen > 0.0078125 then
       return false
     end
 


More information about the Commits mailing list