mirror of
https://github.com/curl/curl.git
synced 2026-07-24 13:37:18 +03:00
urlapi: make sure no +/- signs are accepted in IPv4 numericals
Follow-up to 56a037cc0a. Extends test 1560 to verify.
Reported-by: Tuomas Siipola
Fixes #6916
Closes #6917
This commit is contained in:
parent
9cb48457c6
commit
04488851e2
2 changed files with 8 additions and 1 deletions
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue