Allow alphanumeric TLDs in test for now

This commit is contained in:
rl1987 2018-02-20 19:52:48 +01:00 committed by Nick Mathewson
parent ee1fca727c
commit d891010fdd

View File

@ -5589,11 +5589,10 @@ test_util_hostname_validation(void *arg)
tt_assert(!string_is_valid_hostname("[2a00:1450:401b:800::200e]"));
tt_assert(!string_is_valid_hostname("2a00:1450:401b:800::200e"));
// Last label of a hostname is required to be alphabetic according to
// RFC 1123 Section 2.1.
tt_assert(!string_is_valid_hostname("lucky.13"));
tt_assert(!string_is_valid_hostname("luck.y13"));
tt_assert(!string_is_valid_hostname("luck.y13."));
// We allow alphanumeric TLDs. For discussion, see ticket #25055.
tt_assert(string_is_valid_hostname("lucky.13"));
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