]> source.dussan.org Git - rspamd.git/commitdiff
Do not add too many tokens from headers.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Jul 2015 14:09:52 +0000 (15:09 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Jul 2015 14:09:52 +0000 (15:09 +0100)
src/libstat/stat_process.c

index a04c2536e961acae918b885a9c3ab29d90d5bcf5..a3f8d8a736f0c203c00cc408ff7cd3d54b136e86 100644 (file)
@@ -57,16 +57,16 @@ rspamd_stat_tokenize_header (struct rspamd_task *task,
        if (rh != NULL) {
 
                LL_FOREACH (rh, cur) {
-                       if (cur->value != NULL) {
-                               str.begin = cur->value;
-                               str.len = strlen (cur->value);
-                               g_array_append_val (ar, str);
-                       }
                        if (cur->decoded != NULL) {
                                str.begin = cur->decoded;
                                str.len = strlen (cur->decoded);
                                g_array_append_val (ar, str);
                        }
+                       else if (cur->value != NULL) {
+                               str.begin = cur->value;
+                               str.len = strlen (cur->value);
+                               g_array_append_val (ar, str);
+                       }
                }
        }
 }