From: Vsevolod Stakhov Date: Fri, 12 Oct 2012 17:49:44 +0000 (+0400) Subject: Get rid of some false-positive urls detections. X-Git-Tag: 0.5.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d3750f608caf9bd6cc390da494381ff5f36e57e;p=thirdparty%2Frspamd.git Get rid of some false-positive urls detections. --- diff --git a/src/url.c b/src/url.c index 6245fc9591..f2e4954e26 100644 --- a/src/url.c +++ b/src/url.c @@ -1277,7 +1277,7 @@ static gboolean url_web_start (const gchar *begin, const gchar *end, const gchar *pos, url_match_t *match) { /* Check what we have found */ - if (pos > begin && *pos == 'w' && *(pos + 1) == 'w' && *(pos + 2) == 'w') { + if (pos > begin && (g_ascii_strncasecmp (pos, "www", 3) == 0 || g_ascii_strncasecmp (pos, "ftp", 3) == 0)) { if (!is_open_brace (*(pos - 1)) && !g_ascii_isspace (*(pos - 1))) { return FALSE; }