mirror of
https://github.com/curl/curl.git
synced 2026-07-22 17:57:18 +03:00
doh: allow only http and https in debug mode
Otherwise curl may be told to use for instance pop3 to communicate with the doh server, which most likely is not what you want. Found through fuzzing. Closes #4406
This commit is contained in:
parent
bb74201804
commit
a5bf6a36c5
1 changed files with 3 additions and 0 deletions
|
|
@ -264,6 +264,9 @@ static CURLcode dohprobe(struct Curl_easy *data,
|
|||
#ifndef CURLDEBUG
|
||||
/* enforce HTTPS if not debug */
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
||||
#else
|
||||
/* in debug mode, also allow http */
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
#endif
|
||||
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
|
||||
if(data->set.verbose)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue