From 3ea920099f6d85a09f60e1dea2b339411e46fdc7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 16 Oct 2015 13:57:23 +0100 Subject: Add more sanity checks for emails --- src/libserver/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 32c420131..dfad6b646 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); -- cgit v1.2.3