summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-19 22:58:54 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-21 09:17:55 +0200
commit04488851e291ea0fc3f32e87ea637afcf1c2ca28 (patch)
treec08e26adf453232c65412e4d1a8a35f92a6e6dd1 /tests
parent9cb48457c6a9db533d6759a31a49ba13f1bc591b (diff)
downloadcurl-04488851e291ea0fc3f32e87ea637afcf1c2ca28.tar.gz
urlapi: make sure no +/- signs are accepted in IPv4 numericals
Follow-up to 56a037cc0ad1b2. Extends test 1560 to verify. Reported-by: Tuomas Siipola Fixes #6916 Closes #6917
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib1560.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c
index a469b7a0c..3285df0eb 100644
--- a/tests/libtest/lib1560.c
+++ b/tests/libtest/lib1560.c
@@ -331,6 +331,9 @@ static struct urltestcase get_url_list[] = {
{"https://0xff.0xff.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK},
{"https://1.0xffffff", "https://1.255.255.255/", 0, 0, CURLUE_OK},
/* IPv4 numerical overflows or syntax errors will not normalize */
+ {"https://+127.0.0.1", "https://+127.0.0.1/", 0, 0, CURLUE_OK},
+ {"https://127.-0.0.1", "https://127.-0.0.1/", 0, 0, CURLUE_OK},
+ {"https://127.0. 1", "https://127.0.0.1/", 0, 0, CURLUE_MALFORMED_INPUT},
{"https://1.0x1000000", "https://1.0x1000000/", 0, 0, CURLUE_OK},
{"https://1.2.3.256", "https://1.2.3.256/", 0, 0, CURLUE_OK},
{"https://1.2.3.4.5", "https://1.2.3.4.5/", 0, 0, CURLUE_OK},