mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:53:32 +03:00
urlapi: reject more bad letters from the host name: &+()
Follow-up from eb0167ff7d
Extend test 1560 to verify
Closes #10096
This commit is contained in:
parent
b740f152a8
commit
c20b35ddae
2 changed files with 9 additions and 5 deletions
|
|
@ -636,7 +636,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