diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-23 09:12:15 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-23 09:12:15 +0200 |
commit | 345dbd2351eff0e866f1d854642d89dfa5ddb28c (patch) | |
tree | 3a3b498cbd3da43a5decff5303e3b81f19bb1738 | |
parent | 41db01a39f88d05f43344d0ea1d1b588b3441403 (diff) | |
download | curl-bagder/doh-http-debug.tar.gz |
doh: restrict opertion to HTTP|HTTPS on debug buildsbagder/doh-http-debug
... as allowing all URL schemes causes problems with the fuzzer.
Reported-by: Paul Dreik
Bug: https://curl.haxx.se/mail/lib-2019-09/0091.html
-rw-r--r-- | lib/doh.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -258,7 +258,10 @@ static CURLcode dohprobe(struct Curl_easy *data, #ifdef USE_NGHTTP2 ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS); #endif -#ifndef CURLDEBUG +#ifdef CURLDEBUG + /* allow plain HTTP in debug builds */ + ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP); +#else /* enforce HTTPS if not debug */ ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); #endif |