diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-17 14:41:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-17 14:41:49 +0100 |
commit | ce3ecc6d36e9c235538cb41cbedeb7b5d154257f (patch) | |
tree | efd98ef50c3464c51208c8bb1a435911b81c29d6 | |
parent | 1fd9183656a965a62fbdc16b5f7f2258b176a643 (diff) | |
download | rspamd-ce3ecc6d36e9c235538cb41cbedeb7b5d154257f.tar.gz rspamd-ce3ecc6d36e9c235538cb41cbedeb7b5d154257f.zip |
Sanitize spaces in headers' start.
-rw-r--r-- | src/libmime/message.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index c9ffc5aac..54c5ab59e 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -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, |