aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 13:57:23 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-16 13:57:23 +0100
commit3ea920099f6d85a09f60e1dea2b339411e46fdc7 (patch)
treeb2a31dcf3a5e9b08d561c817c276c46243b89687 /src/libserver
parent92f71e385436e8b33072fd9ee7638b93129f9551 (diff)
downloadrspamd-3ea920099f6d85a09f60e1dea2b339411e46fdc7.tar.gz
rspamd-3ea920099f6d85a09f60e1dea2b339411e46fdc7.zip
Add more sanity checks for emails
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/protocol.c3
1 files changed, 2 insertions, 1 deletions
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);