aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-24 14:04:25 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-24 14:04:25 +0000
commit66fdf123b1368907fa65bd6db9a6864cb8be63f3 (patch)
tree403d5a975f5f7fd807aeb3b7429e21b3240c7296
parent3e2d425eed0a22b386e86b22dee77c7da4601f50 (diff)
downloadrspamd-66fdf123b1368907fa65bd6db9a6864cb8be63f3.tar.gz
rspamd-66fdf123b1368907fa65bd6db9a6864cb8be63f3.zip
[Fix] Fix parsing of URLs with username
-rw-r--r--src/libserver/url.c6
1 files changed, 6 insertions, 0 deletions
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);