diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-24 12:32:54 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-24 12:32:54 +0100 |
commit | 1bc758006df1e18a48eb06275fc8122020688d47 (patch) | |
tree | d1339356f13d70eee980f95a62d4ef2885d48c62 /src/url.c | |
parent | 62238026d4230392c8383db90b969cbdc8d4166c (diff) | |
download | rspamd-1bc758006df1e18a48eb06275fc8122020688d47.tar.gz rspamd-1bc758006df1e18a48eb06275fc8122020688d47.zip |
Fix urls detection for strings with multiply dots.
Diffstat (limited to 'src/url.c')
-rw-r--r-- | src/url.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1217,6 +1217,16 @@ url_tld_start (const gchar *begin, const gchar *end, const gchar *pos, url_match match->m_begin = p; return TRUE; } + else if (*p == '.') { + if (p == begin) { + /* Urls cannot start with a dot */ + return FALSE; + } + if (!g_ascii_isalnum (p[1])) { + /* Wrong we have an invalid character after dot */ + return FALSE; + } + } p --; } |