From 39a625ff720f7cac93830be2e01ee590ffc7f8bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 30 Sep 2021 22:19:45 +0200 Subject: Disable transitional IDN rules, accept only sane names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transitional encoding accepts every emoticon you can think about. Because setlocale were not enabled before, IDN 2003 input was not accepted by dnsmasq. It makes no sense therefore to maintain backward compatibility. Accept only proper encoded unicode names and reject random unicode characters. Signed-off-by: Petr Menšík --- src/util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util.c b/src/util.c index e641905..7bef630 100644 --- a/src/util.c +++ b/src/util.c @@ -233,8 +233,6 @@ char *canonicalise(char *in, int *nomem) { # ifdef HAVE_LIBIDN2 rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL); - if (rc == IDN2_DISALLOWED) - rc = idn2_to_ascii_lz(in, &ret, IDN2_TRANSITIONAL); # else rc = idna_to_ascii_lz(in, &ret, 0); # endif -- cgit v1.2.1