diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2020-05-11 19:43:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-11 20:18:01 +0200 |
commit | 7167a62b9e2f648adc11411446f876f2458722a5 (patch) | |
tree | eb0b58dfdde6cd2ad37d1aff90f10ebb41c65f56 /http.h | |
parent | t5551: test that GIT_TRACE_CURL redacts password (diff) | |
download | git-7167a62b9e2f648adc11411446f876f2458722a5.tar.xz git-7167a62b9e2f648adc11411446f876f2458722a5.zip |
http, imap-send: stop using CURLOPT_VERBOSE
Whenever GIT_CURL_VERBOSE is set, teach Git to behave as if
GIT_TRACE_CURL=1 and GIT_TRACE_CURL_NO_DATA=1 is set, instead of setting
CURLOPT_VERBOSE.
This is to prevent inadvertent revelation of sensitive data. In
particular, GIT_CURL_VERBOSE redacts neither the "Authorization" header
nor any cookies specified by GIT_REDACT_COOKIES.
Unifying the tracing mechanism also has the future benefit that any
improvements to the tracing mechanism will benefit both users of
GIT_CURL_VERBOSE and GIT_TRACE_CURL, and we do not need to remember to
implement any improvement twice.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -252,6 +252,13 @@ int finish_http_object_request(struct http_object_request *freq); void abort_http_object_request(struct http_object_request *freq); void release_http_object_request(struct http_object_request *freq); +/* + * Instead of using environment variables to determine if curl tracing happens, + * behave as if GIT_TRACE_CURL=1 and GIT_TRACE_CURL_NO_DATA=1 is set. Call this + * before calling setup_curl_trace(). + */ +void http_trace_curl_no_data(void); + /* setup routine for curl_easy_setopt CURLOPT_DEBUGFUNCTION */ void setup_curl_trace(CURL *handle); #endif /* HTTP_H */ |