From 172f7ccc701c35109d1fe25a2470938a243bedb3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 13 Dec 2016 11:01:33 +0000 Subject: [PATCH] [Minor] Do not treat IDN urls as bad URLs --- src/libserver/html.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libserver/html.c b/src/libserver/html.c index 8618930ebc..fb2a8a477c 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1283,7 +1283,7 @@ rspamd_html_process_url (rspamd_mempool_t *pool, const gchar *start, guint len, if (G_UNLIKELY (s[i] == '\r' || s[i] == '\n')) { continue; } - else if (G_UNLIKELY (!g_ascii_isgraph (s[i]))) { + else if (G_UNLIKELY (s[i] < 0x80 && !g_ascii_isgraph (s[i]))) { /* URL encode */ *d++ = '%'; *d++ = hexdigests[(s[i] >> 4) & 0xf]; -- 2.47.3