From: Vsevolod Stakhov Date: Fri, 29 Sep 2017 18:24:55 +0000 (+0100) Subject: [Fix] Do not allow garbadge when checking url domain X-Git-Tag: 1.6.5~3^2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9f6036dbf1852abde0daf5c4b4417e8126d15401;p=rspamd.git [Fix] Do not allow garbadge when checking url domain --- diff --git a/src/libserver/url.c b/src/libserver/url.c index 824c0dff8..f7a73ac5a 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -965,9 +965,17 @@ rspamd_web_parse (struct http_parser_url *u, const gchar *str, gsize len, p = p + i; } - else { + else if (is_urlsafe (*p)) { p ++; } + else { + if (strict) { + goto out; + } + else { + goto set; + } + } } else { p++;