From 66fdf123b1368907fa65bd6db9a6864cb8be63f3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 24 Nov 2016 14:04:25 +0000 Subject: [PATCH] [Fix] Fix parsing of URLs with username --- src/libserver/url.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libserver/url.c b/src/libserver/url.c index c66728aff..1afde3b6b 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -867,6 +867,12 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len, if (is_url_end (t)) { goto set; } + else if (*p == '@' && !user_seen) { + /* We need to fallback and test user */ + p = slash; + user_seen = TRUE; + st = parse_user; + } else if (*p != '.' && *p != '-' && *p != '_' && *p != '%') { uc = g_utf8_get_char_validated (p, last - p); -- 2.39.5