lib1560: verify that more bad host names are rejected
when setting the hostname component of a URL Closes #10922
This commit is contained in:
parent
587dac67fb
commit
309a517ffd
@ -697,6 +697,24 @@ static int checkurl(const char *org, const char *url, const char *out)
|
||||
|
||||
/* !checksrc! disable SPACEBEFORECOMMA 1 */
|
||||
static const struct setcase set_parts_list[] = {
|
||||
{"https://example.com/",
|
||||
"host=http://fake,",
|
||||
"",
|
||||
0, /* get */
|
||||
0, /* set */
|
||||
CURLUE_OK, CURLUE_BAD_HOSTNAME},
|
||||
{"https://example.com/",
|
||||
"host=test%,",
|
||||
"",
|
||||
0, /* get */
|
||||
0, /* set */
|
||||
CURLUE_OK, CURLUE_BAD_HOSTNAME},
|
||||
{"https://example.com/",
|
||||
"host=te st,",
|
||||
"",
|
||||
0, /* get */
|
||||
0, /* set */
|
||||
CURLUE_OK, CURLUE_BAD_HOSTNAME},
|
||||
{"https://example.com/",
|
||||
"host=0xff,", /* '++' there's no automatic URL decode when settin this
|
||||
part */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user