diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-08 14:12:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-08 14:12:45 +0100 |
commit | 0ee9bac6411edcca64e4cfce4cc1a838fe6e2224 (patch) | |
tree | f2f023a12d69a6d69c10aa6edce54d0322f0c535 /src/libserver/url.c | |
parent | 8402676ce759e40d66228cc5fdfc2e40cded91f3 (diff) | |
download | rspamd-0ee9bac6411edcca64e4cfce4cc1a838fe6e2224.tar.gz rspamd-0ee9bac6411edcca64e4cfce4cc1a838fe6e2224.zip |
More fixes to url parser.
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r-- | src/libserver/url.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index 55f4c30e0..fb3e961e6 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -477,7 +477,7 @@ rspamd_mailto_parse (struct http_parser_url *u, const gchar *str, gsize len, } if (!strict) { - return 1; + return 0; } return ret; @@ -1452,7 +1452,6 @@ url_email_start (struct url_callback_data *cb, /* We have mailto:// at the beginning */ match->m_begin = pos; - return TRUE; } else { /* Just '@' */ @@ -1460,12 +1459,11 @@ url_email_start (struct url_callback_data *cb, /* Check if this match is a part of the previous mailto: email */ if (cb->last_at != NULL && cb->last_at == pos) { cb->last_at = NULL; + return FALSE; } - - return FALSE; } - return FALSE; + return TRUE; } static gboolean @@ -1515,7 +1513,7 @@ url_email_end (struct url_callback_data *cb, c --; } /* Rewind to the first alphanumeric character */ - while (c < pos && !g_ascii_isalnum (c)) { + while (c < pos && !g_ascii_isalnum (*c)) { c ++; } |