2010-11-17 [colin] 3.7.6cvs64

* src/common/utils.c
		Fix multiple @ in generated message-ids.
		That's not allowed in RFC 2822.
This commit is contained in:
Colin Leroy 2010-11-17 19:32:19 +00:00
parent 8c5496662c
commit a9a30e9f42
4 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2010-11-17 [colin] 3.7.6cvs64
* src/common/utils.c
Fix multiple @ in generated message-ids.
That's not allowed in RFC 2822.
2010-11-16 [mones] 3.7.6cvs63
* manual/es/advanced.xml

View file

@ -4059,3 +4059,4 @@
( cvs diff -u -r 1.28.2.43 -r 1.28.2.44 src/addrindex.c; ) > 3.7.6cvs61.patchset
( cvs diff -u -r 1.60.2.55 -r 1.60.2.56 src/filtering.c; ) > 3.7.6cvs62.patchset
( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 manual/es/advanced.xml; ) > 3.7.6cvs63.patchset
( cvs diff -u -r 1.36.2.187 -r 1.36.2.188 src/common/utils.c; ) > 3.7.6cvs64.patchset

View file

@ -12,7 +12,7 @@ MINOR_VERSION=7
MICRO_VERSION=6
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=63
EXTRA_VERSION=64
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -3870,6 +3870,12 @@ gchar *generate_msgid(gchar *buf, gint len, gchar *user_addr)
}
}
/* Replace all @ but the last one in addr, with underscores.
* RFC 2822 States that msg-id syntax only allows one @.
*/
while (strchr(addr, '@') != NULL && strchr(addr, '@') != strrchr(addr, '@'))
*(strchr(addr, '@')) = '_';
g_snprintf(buf, len, "%04d%02d%02d%02d%02d%02d.%08x%s",
lt->tm_year + 1900, lt->tm_mon + 1,
lt->tm_mday, lt->tm_hour,