]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Reduce digit->number transmission penalty
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 10 May 2017 10:49:14 +0000 (11:49 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 20 May 2017 11:30:45 +0000 (12:30 +0100)
Issue: #1630

src/plugins/chartable.c

index 1c50f519446a3aecd246de4abfbdd6e8b00c80f4..b0c05fa8255940867005a8bb5b2d880c20ce592e 100644 (file)
@@ -209,7 +209,7 @@ rspamd_chartable_process_word_utf (struct rspamd_task *task,
                                /* Penalize digit -> alpha translations */
                                if (!is_url && sc != UBLOCK_BASIC_LATIN &&
                                                prev_state != start_process) {
-                                       badness += 1.0;
+                                       badness += 0.25;
                                }
                        }
                        else if (state == got_alpha) {
@@ -305,7 +305,7 @@ rspamd_chartable_process_word_ascii (struct rspamd_task *task,
                        if (state == got_digit) {
                                /* Penalize digit -> alpha translations */
                                if (seen_alpha && !is_url && !g_ascii_isxdigit (*p)) {
-                                       badness += 1.0;
+                                       badness += 0.25;
                                }
                        }
                        else if (state == got_alpha) {