commit c3ec216: [Minor] Do not try to check numeric url in utf content

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Sep 11 11:35:05 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-09-11 12:29:08 +0100
URL: https://github.com/rspamd/rspamd/commit/c3ec216144d3c0f7c53823657727200dc9133843 (HEAD -> master)

[Minor] Do not try to check numeric url in utf content

---
 src/libserver/url.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libserver/url.c b/src/libserver/url.c
index c10073dcb..8186cc804 100644
--- a/src/libserver/url.c
+++ b/src/libserver/url.c
@@ -1792,6 +1792,10 @@ rspamd_url_is_ip (struct rspamd_url *uri, rspamd_mempool_t *pool)
 		return FALSE;
 	}
 
+	if (rspamd_str_has_8bit (p, end - p)) {
+		return FALSE;
+	}
+
 	if (rspamd_parse_inet_address_ip4 (p, end - p, &in4)) {
 		rspamd_url_regen_from_inet_addr (uri, &in4, AF_INET, pool);
 		ret = TRUE;


More information about the Commits mailing list