summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Menšík <pemensik@redhat.com>2021-09-30 22:19:45 +0200
committerSimon Kelley <simon@thekelleys.org.uk>2021-10-06 23:33:13 +0100
commit39a625ff720f7cac93830be2e01ee590ffc7f8bd (patch)
tree5643b4e96ecf44d73883f990f873061abda628a3
parentad32ca18a753c264bb702e2b6f19e2d7f1de1612 (diff)
downloaddnsmasq-39a625ff720f7cac93830be2e01ee590ffc7f8bd.tar.gz
Disable transitional IDN rules, accept only sane names
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 <pemensik@redhat.com>
-rw-r--r--src/util.c2
1 files changed, 0 insertions, 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