mirror of
https://github.com/curl/curl.git
synced 2026-07-24 08:47:50 +03:00
urlapi: reject more bad characters from the host name field
Extended test 1560 to verify Report from the ongoing source code audit by Trail of Bits. Closes #9608
This commit is contained in:
parent
267668308b
commit
eb0167ff7d
2 changed files with 21 additions and 1 deletions
|
|
@ -637,7 +637,7 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname,
|
|||
}
|
||||
else {
|
||||
/* letters from the second string are not ok */
|
||||
len = strcspn(hostname, " \r\n\t/:#?!@");
|
||||
len = strcspn(hostname, " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,");
|
||||
if(hlen != len)
|
||||
/* hostname with bad content */
|
||||
return CURLUE_BAD_HOSTNAME;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue