mirror of
https://github.com/curl/curl.git
synced 2026-05-17 20:56:22 +03:00
urlapi: reject percent-decoding host name into separator bytes
CVE-2022-27780 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-27780.html Closes #8826
This commit is contained in:
parent
5c7da89d40
commit
914aaab915
1 changed files with 2 additions and 2 deletions
|
|
@ -678,8 +678,8 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname)
|
|||
#endif
|
||||
}
|
||||
else {
|
||||
/* letters from the second string is not ok */
|
||||
len = strcspn(hostname, " \r\n");
|
||||
/* letters from the second string are not ok */
|
||||
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