]> source.dussan.org Git - rspamd.git/commitdiff
Fix parsing of IP URLs
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 19 Nov 2015 16:29:48 +0000 (16:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 19 Nov 2015 16:29:48 +0000 (16:29 +0000)
src/libserver/url.c

index f0a65df8cfd486901415e52de9202ed0fae44ca1..b1e1793c2883404b91d633d57959dd0f01d28d6f 100644 (file)
@@ -1167,7 +1167,7 @@ rspamd_url_is_ip (struct rspamd_url *uri, rspamd_mempool_t *pool)
                        p++;
                }
 
-               if (check_num && dots <= 3) {
+               if (check_num && dots <= 4) {
                        memcpy (&in4, &n, sizeof (in4));
                        uri->host = rspamd_mempool_alloc (pool, INET_ADDRSTRLEN + 1);
                        memset (uri->host, 0, INET_ADDRSTRLEN + 1);