From: Vsevolod Stakhov Date: Tue, 8 Aug 2017 07:20:34 +0000 (+0100) Subject: [Fix] Try harder to find urls X-Git-Tag: 1.6.4~22^2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c4b7a3072b00a2fa0c0bfa381b71181aa104cd89;p=rspamd.git [Fix] Try harder to find urls --- diff --git a/src/libserver/url.c b/src/libserver/url.c index 8e0cb52ee..d359a9984 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1895,8 +1895,10 @@ url_web_start (struct url_callback_data *cb, (g_ascii_strncasecmp (pos, "www", 3) == 0 || g_ascii_strncasecmp (pos, "ftp", 3) == 0)) { - if (!is_url_start (*(pos - 1)) && !g_ascii_isspace (*(pos - 1)) && - pos - 1 != match->prev_newline_pos) { + if (!(is_url_start (*(pos - 1)) || + g_ascii_isspace (*(pos - 1)) || + pos - 1 == match->prev_newline_pos || + (*(pos - 1) & 0x80))) { /* Chinese trick */ return FALSE; } }