diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-04 06:49:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-04 06:49:19 +0200 |
commit | 58e2bc452b0539977eff6431d63867030429e2f4 (patch) | |
tree | f77361ef1404d13680a203ad172523e83b9b82b4 /http.c | |
parent | Merge branch 'bs/ls-files-opt-help-text-update' (diff) | |
parent | http: match headers case-insensitively when redacting (diff) | |
download | git-58e2bc452b0539977eff6431d63867030429e2f4.tar.xz git-58e2bc452b0539977eff6431d63867030429e2f4.zip |
Merge branch 'jk/http-redact-fix'
Sensitive data in the HTTP trace were supposed to be redacted, but
we failed to do so in HTTP/2 requests.
* jk/http-redact-fix:
http: match headers case-insensitively when redacting
Diffstat (limited to 'http.c')
-rw-r--r-- | http.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -551,8 +551,8 @@ static void redact_sensitive_header(struct strbuf *header) const char *sensitive_header; if (trace_curl_redact && - (skip_prefix(header->buf, "Authorization:", &sensitive_header) || - skip_prefix(header->buf, "Proxy-Authorization:", &sensitive_header))) { + (skip_iprefix(header->buf, "Authorization:", &sensitive_header) || + skip_iprefix(header->buf, "Proxy-Authorization:", &sensitive_header))) { /* The first token is the type, which is OK to log */ while (isspace(*sensitive_header)) sensitive_header++; @@ -562,7 +562,7 @@ static void redact_sensitive_header(struct strbuf *header) strbuf_setlen(header, sensitive_header - header->buf); strbuf_addstr(header, " <redacted>"); } else if (trace_curl_redact && - skip_prefix(header->buf, "Cookie:", &sensitive_header)) { + skip_iprefix(header->buf, "Cookie:", &sensitive_header)) { struct strbuf redacted_header = STRBUF_INIT; const char *cookie; |