diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-10-19 18:46:58 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-10-19 18:46:58 +0400 |
commit | 2f23fd64a793f818300bb645beb16f1a01528d31 (patch) | |
tree | 02611e7f7f8d8989d05adc6a7550407b0a2b63b7 | |
parent | 4fa8c7af5ca7a312d7981802b369c6e63b2f5e0b (diff) | |
download | rspamd-2f23fd64a793f818300bb645beb16f1a01528d31.tar.gz rspamd-2f23fd64a793f818300bb645beb16f1a01528d31.zip |
Fixed bug with file urls (reported by Anton Nekhoroshin)
-rw-r--r-- | src/plugins/surbl.c | 3 | ||||
-rw-r--r-- | src/protocol.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 452b590d5..1ebf78991 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -891,6 +891,9 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data) debug_task ("check url %s", struri (url)); + if (url->hostlen <= 0) { + return FALSE; + } if (surbl_module_ctx->use_redirector) { f.begin = url->host; diff --git a/src/protocol.c b/src/protocol.c index 77043bdc0..6806c0ea3 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -488,7 +488,7 @@ show_url_header (struct worker_task *task) /* Write this url to log as well */ msg_info ("url found: <%s>, score: [%.2f / %.2f]", struri (url), default_score, default_required_score); } - if (g_tree_lookup (url_tree, url) == NULL) { + if (g_tree_lookup (url_tree, url) == NULL && url->hostlen > 0) { g_tree_insert (url_tree, url, url); host.begin = url->host; host.len = url->hostlen; |