From: Vsevolod Stakhov Date: Fri, 16 Oct 2015 12:57:23 +0000 (+0100) Subject: Add more sanity checks for emails X-Git-Tag: 1.0.6~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ea920099f6d85a09f60e1dea2b339411e46fdc7;p=thirdparty%2Frspamd.git Add more sanity checks for emails --- diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 32c4201314..dfad6b646f 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -709,7 +709,8 @@ emails_protocol_cb (gpointer key, gpointer value, gpointer ud) struct rspamd_url *url = value; ucl_object_t *obj; - if (url->userlen > 0 && url->hostlen > 0) { + if (url->userlen > 0 && url->hostlen > 0 && + url->host == url->user + url->userlen + 1) { obj = ucl_object_fromlstring (url->user, url->userlen + url->hostlen + 1); ucl_array_append (cb->top, obj);