]> source.dussan.org Git - rspamd.git/commitdiff
Refuse empty emails in urls detection as well.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Nov 2013 16:12:02 +0000 (16:12 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 Nov 2013 16:12:02 +0000 (16:12 +0000)
src/url.c

index 927b618892c419e0b7e4c41874051de1461e9afc..d1a85b32a8efa600ea64729d97f52e3b8976584d 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -1444,7 +1444,7 @@ url_email_start (const gchar *begin, const gchar *end, const gchar *pos, url_mat
                while (p > begin && (is_domain (*p) || *p == '.' || *p == '_')) {
                        p --;
                }
-               if (!is_domain (*p)) {
+               if (!is_domain (*p) && p != pos - 1) {
                        match->m_begin = p + 1;
                        return TRUE;
                }