mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
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>
This commit is contained in:
committed by
Simon Kelley
parent
ad32ca18a7
commit
39a625ff72
@@ -233,8 +233,6 @@ char *canonicalise(char *in, int *nomem)
|
|||||||
{
|
{
|
||||||
# ifdef HAVE_LIBIDN2
|
# ifdef HAVE_LIBIDN2
|
||||||
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
|
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
|
||||||
if (rc == IDN2_DISALLOWED)
|
|
||||||
rc = idn2_to_ascii_lz(in, &ret, IDN2_TRANSITIONAL);
|
|
||||||
# else
|
# else
|
||||||
rc = idna_to_ascii_lz(in, &ret, 0);
|
rc = idna_to_ascii_lz(in, &ret, 0);
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
Reference in New Issue
Block a user