mirror of
https://github.com/moparisthebest/curl
synced 2024-11-15 22:15:13 -05: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
@ -264,6 +264,9 @@ static CURLcode dohprobe(struct Curl_easy *data,
|
|||||||
#ifndef CURLDEBUG
|
#ifndef CURLDEBUG
|
||||||
/* enforce HTTPS if not debug */
|
/* enforce HTTPS if not debug */
|
||||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
||||||
|
#else
|
||||||
|
/* in debug mode, also allow http */
|
||||||
|
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||||
#endif
|
#endif
|
||||||
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
|
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
|
||||||
if(data->set.verbose)
|
if(data->set.verbose)
|
||||||
|
Loading…
Reference in New Issue
Block a user