diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libmime/mime_headers.c | 10 | ||||
-rw-r--r-- | src/libserver/re_cache.c | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 0564379e4..81a7b666a 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -516,8 +516,14 @@ rspamd_mime_header_sanity_check (GString *str) for (i = 0; i < str->len; i ++) { t = str->str[i]; - if (!((t & 0x80) || g_ascii_isgraph (t) || t == ' ')) { - str->str[i] = '?'; + if (!((t & 0x80) || g_ascii_isgraph (t))) { + if (g_ascii_isspace (t)) { + /* Replace spaces characters with plain space */ + str->str[i] = ' '; + } + else { + str->str[i] = '?'; + } } } } diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 9aad6b591..d0e17603d 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -809,9 +809,10 @@ rspamd_re_cache_exec_re (struct rspamd_task *task, ret = rspamd_re_cache_process_regexp_data (rt, re, task, scvec, lenvec, headerlist->len, raw); - msg_debug_re_task ("checking header %s regexp: %s -> %d", + msg_debug_re_task ("checking header %s regexp: %s=%*s -> %d", re_class->type_data, - rspamd_regexp_get_pattern (re), ret); + rspamd_regexp_get_pattern (re), + (int)lenvec[0], scvec[0], ret); g_free (scvec); g_free (lenvec); } |