]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not treat IDN urls as bad URLs
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 13 Dec 2016 11:01:33 +0000 (11:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Jan 2017 14:44:17 +0000 (14:44 +0000)
src/libserver/html.c

index 8618930ebcca9809c300a03f7a09a7338af20c5d..fb2a8a477c6bd31ff6cd2ac3b60cae9df16bfc48 100644 (file)
@@ -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];