aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-02-17 21:49:02 +0100
committerNick Mathewson <nickm@torproject.org>2018-03-28 07:39:03 -0400
commitdbb7c8e6fd757db51226a47a2e14f4fd1aaf60c3 (patch)
tree1b990be96b52e6e7f5a38685a35a2ca60d68e460 /src/test/test_util.c
parent4413e52f9e2e3898f870df481aea93b1ea5fd836 (diff)
downloadtor-dbb7c8e6fd757db51226a47a2e14f4fd1aaf60c3.tar.gz
tor-dbb7c8e6fd757db51226a47a2e14f4fd1aaf60c3.zip
Validate hostnames with punycode TLDs correctly
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c4
1 files changed, 4 insertions, 0 deletions
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;
}