From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Git List <git@vger.kernel.org>, Daniel Stenberg <daniel@haxx.se>
Subject: Re: [PATCH] http: match headers case-insensitively when redacting
Date: Wed, 22 Sep 2021 12:10:44 -0700 [thread overview]
Message-ID: <xmqqczp077ez.fsf@gitster.g> (raw)
In-Reply-To: <YUovLNjkFilkcTAU@coredump.intra.peff.net> (Jeff King's message of "Tue, 21 Sep 2021 15:14:52 -0400")
Jeff King <peff@peff.net> writes:
> On Tue, Sep 21, 2021 at 03:06:20PM -0400, Eric Sunshine wrote:
>
>> On Tue, Sep 21, 2021 at 2:41 PM Jeff King <peff@peff.net> wrote:
>> > When HTTP/2 is in use, we fail to correctly redact "Authorization" (and
>> > other) headers in our GIT_TRACE_CURL output.
>> >
>> > We get the headers in our CURLOPT_DEBUGFUNCTION callback, curl_trace().
>> > It passes them along to curl_dump_header(), which in turn checks
>> > redact_sensitive_header(). We see the headers as a text buffer like:
>> >
>> > Host: ...
>> > Authorization: Basic ...
>> >
>> > After breaking it into lines, we match each header using skip_prefix().
>> > This is case-insensitive, even though HTTP headers are case-insensitive.
>> > This has worked reliably in the past because these headers are generated
>> > by curl itself, which is predictable in what it sends.
>>
>> Did you mean "This is case-sensitive..."?
>
> Whoops, yes. It probably makes a lot more sense with that fix. :)
Yeah, I was wondering about the same thing when I read it the first
time.
next prev parent reply other threads:[~2021-09-22 19:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 18:41 [PATCH] http: match headers case-insensitively when redacting Jeff King
2021-09-21 18:47 ` Jeff King
2021-09-21 20:14 ` Carlo Arenas
2021-09-21 20:40 ` Jeff King
2021-09-21 22:00 ` Daniel Stenberg
2021-09-22 2:32 ` Jeff King
2021-09-21 19:06 ` Eric Sunshine
2021-09-21 19:14 ` Jeff King
2021-09-22 19:10 ` Junio C Hamano [this message]
2021-09-21 21:20 ` Taylor Blau
2021-09-22 2:30 ` Jeff King
2021-09-22 2:32 ` Bagas Sanjaya
2021-09-22 20:11 ` Jeff King
2021-09-23 1:22 ` Ævar Arnfjörð Bjarmason
2021-09-23 21:56 ` Jeff King
2021-09-22 19:19 ` Junio C Hamano
2021-09-22 20:09 ` Jeff King
2021-09-22 20:51 ` Junio C Hamano
2021-09-22 21:18 ` Jeff King
2021-09-22 21:42 ` Junio C Hamano
2021-09-22 22:11 ` [PATCH v2] " Jeff King
2021-09-22 22:14 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqczp077ez.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=daniel@haxx.se \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).