]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libtest/lib1560: verify the host name percent decode fix
authorDaniel Stenberg <daniel@haxx.se>
Mon, 9 May 2022 06:19:38 +0000 (08:19 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 9 May 2022 10:50:41 +0000 (12:50 +0200)
tests/libtest/lib1560.c

index 76148499d4d756774a2867df463d3f5acab62b85..84ee933a06606b53e65d31852d49eafb023e62e1 100644 (file)
@@ -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},