From: Vsevolod Stakhov Date: Thu, 24 Nov 2016 14:04:25 +0000 (+0000) Subject: [Fix] Fix parsing of URLs with username X-Git-Tag: 1.4.1~73 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=66fdf123b1368907fa65bd6db9a6864cb8be63f3;p=rspamd.git [Fix] Fix parsing of URLs with username --- 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);