]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Phishing: Fix confusing scoring
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 25 Nov 2021 15:34:04 +0000 (15:34 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 25 Nov 2021 15:34:04 +0000 (15:34 +0000)
src/plugins/lua/phishing.lua

index 0af9f738b2eeed77fb7742c38b3c51c31c554d25..dac5e92e922067fa6a06bc27e8ea6d2217ec6f42 100644 (file)
@@ -266,9 +266,8 @@ local function phishing_cb(task)
               lua_util.debugm(N, task, "confusable: %1 -> %2: different characters",
                       tld, ptld, why)
             else
-              -- We have totally different strings in tld, so penalize it significantly
-              if dist > 2 then dist = 2 end
-              weight = util.tanh((2 - dist) * 0.5)
+              -- We have totally different strings in tld, so penalize it somehow
+              weight = 0.5
             end
           end