]> source.dussan.org Git - rspamd.git/commitdiff
Sanitize spaces in headers' start.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Sep 2015 13:41:49 +0000 (14:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 17 Sep 2015 13:41:49 +0000 (14:41 +0100)
src/libmime/message.c

index c9ffc5aac6cc83499ac54aedc2f5c93d5ddcd7e7..54c5ab59ebaae871dbfa706167b25652330c7f09 100644 (file)
@@ -528,6 +528,11 @@ process_raw_headers (struct rspamd_task *task, GHashTable *target,
                        }
 
                        *tp = '\0';
+                       /* Strip the initial spaces that could also be added by folding */
+                       while (*tmp != '\0' && g_ascii_isspace (*tmp)) {
+                               tmp ++;
+                       }
+
                        new->value = tmp;
                        new->decoded = g_mime_utils_header_decode_text (new->value);
                        rspamd_mempool_add_destructor (task->task_pool,