From: Vsevolod Stakhov Date: Tue, 8 Aug 2017 07:20:34 +0000 (+0100) Subject: [Fix] Try harder to find urls X-Git-Tag: 1.7.0~756 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3376b6d6e88e5a497861a718859991029e8ff211;p=thirdparty%2Frspamd.git [Fix] Try harder to find urls --- diff --git a/src/libserver/url.c b/src/libserver/url.c index 35e704f67d..8370b8d994 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; } }