Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6949:eda51f08e8bf HEAD
Sanitize the headers before logging.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 08 Dec 2007 15:04:52 +0200 |
parents | 6b5f89c41de5 |
children | 63e225ab7361 |
files | src/deliver/deliver.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/deliver/deliver.c Sat Dec 08 14:59:05 2007 +0200 +++ b/src/deliver/deliver.c Sat Dec 08 15:04:52 2007 +0200 @@ -107,6 +107,7 @@ { '\0', NULL } }; struct var_expand_table *tab; + unsigned int i; tab = t_malloc(sizeof(static_tab)); memcpy(tab, static_tab, sizeof(static_tab)); @@ -115,6 +116,8 @@ (void)mail_get_first_header(mail, "Message-ID", &tab[1].value); (void)mail_get_first_header(mail, "Subject", &tab[2].value); tab[3].value = deliver_get_address(mail, "From"); + for (i = 1; tab[i].key != '\0'; i++) + tab[i].value = str_sanitize(tab[i].value, 80); return tab; }