From dbb7c8e6fd757db51226a47a2e14f4fd1aaf60c3 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sat, 17 Feb 2018 21:49:02 +0100 Subject: Validate hostnames with punycode TLDs correctly --- src/test/test_util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test') diff --git a/src/test/test_util.c b/src/test/test_util.c index db2ea1a348..ef1f420fe3 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5595,6 +5595,10 @@ test_util_hostname_validation(void *arg) tt_assert(!string_is_valid_hostname("luck.y13")); tt_assert(!string_is_valid_hostname("luck.y13.")); + // We allow punycode TLDs. For examples, see + // http://data.iana.org/TLD/tlds-alpha-by-domain.txt + tt_assert(string_is_valid_hostname("example.xn--l1acc")); + done: return; } -- cgit v1.2.3-54-g00ecf