From: Daniel Stenberg Date: Mon, 9 May 2022 06:19:38 +0000 (+0200) Subject: libtest/lib1560: verify the host name percent decode fix X-Git-Tag: curl-7_83_1~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfa47974fea04753d1131cac701e331cd91bec6f;p=thirdparty%2Fcurl.git libtest/lib1560: verify the host name percent decode fix --- diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 76148499d4..84ee933a06 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -374,6 +374,13 @@ static const struct testcase get_parts_list[] ={ static const struct urltestcase get_url_list[] = { /* percent encoded host names */ + {"http://example.com%40127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%21127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%3f127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%23127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%3a127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%09127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, + {"http://example.com%2F127.0.0.1/", "", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://%this", "https://%25this/", 0, 0, CURLUE_OK}, {"https://h%c", "https://h%25c/", 0, 0, CURLUE_OK}, {"https://%%%%%%", "https://%25%25%25%25%25%25/", 0, 0, CURLUE_OK},