git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] updating curl http/2 header matching (again)

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 15, 2023, 18:28 UTC
Message-ID
<ZQSiWXm3y07afjCv@nand.local>
In-Reply-To
<20230915113237.GA3531328@coredump.intra.peff.net>
On Fri, Sep 15, 2023 at 07:32:37AM -0400, Jeff King wrote:
> (If anyone wants to confirm the bug or test, the new version of curl
> just hit debian unstable).

These two patches look sensible, and I can confirm that they resolve the issue with the newest version of curl. With the latest 'master' (which is bda494f404 (The ninth batch, 2023-09-14), at the time of writing) and an old version of curl, I get:

    $ ./t5559-http-fetch-smart-http2.sh -vdi
    [...]
    expecting success of 5559.17 'GIT_TRACE_CURL redacts auth details':
      rm -rf redact-auth trace &&
      set_askpass user@host pass@host &&
      GIT_TRACE_CURL="$(pwd)/trace" git clone --bare "$HTTPD_URL/auth/smart/repo.git" redact-auth &&
      expect_askpass both user@host &&
      # Ensure that there is no "Basic" followed by a base64 string, but that
      # the auth details are redacted
      ! grep -i "Authorization: Basic [0-9a-zA-Z+/]" trace &&
      grep -i "Authorization: Basic <redacted>" trace
    Cloning into bare repository 'redact-auth'...
    remote: Enumerating objects: 6, done.
    remote: Counting objects: 100% (6/6), done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
    Receiving objects: 100% (6/6), done.
    == Info: [HTTP/2] [3] [authorization: Basic dXNlckBob3N0OnBhc3NAaG9zdA==]
    == Info: [HTTP/2] [5] [authorization: Basic dXNlckBob3N0OnBhc3NAaG9zdA==]
    == Info: [HTTP/2] [7] [authorization: Basic dXNlckBob3N0OnBhc3NAaG9zdA==]
    not ok 17 - GIT_TRACE_CURL redacts auth details
    #
    #		rm -rf redact-auth trace &&
    #		set_askpass user@host pass@host &&
    #		GIT_TRACE_CURL="$(pwd)/trace" git clone --bare "$HTTPD_URL/auth/smart/repo.git" redact-auth &&
    #		expect_askpass both user@host &&
    #
    #		# Ensure that there is no "Basic" followed by a base64 string, but that
    #		# the auth details are redacted
    #		! grep -i "Authorization: Basic [0-9a-zA-Z+/]" trace &&
    #		grep -i "Authorization: Basic <redacted>" trace
    #
and after applying these patches, those tests pass.
    $ ./t5559-http-fetch-smart-http2.sh -di
    [...]
    # passed all 54 test(s)
    1..54

Thanks, Taylor

Previous: Taylor Blau
Message 10 of 10 in “updating curl http/2 header matching (again)”
  1. 0/2 updating curl http/2 header matching (again)Jeff King, Sep 15, 2023
  2. 1/2 http: factor out matching of curl http/2 trace linesJeff King, Sep 15, 2023
  3. Taylor BlauSep 15, 2023
  4. 2/2 http: update curl http/2 info matching for curl 8.3.0Jeff King, Sep 15, 2023
  5. Junio C HamanoSep 15, 2023
  6. Jeff KingSep 16, 2023
  7. Taylor BlauSep 15, 2023
  8. Jeff KingSep 16, 2023
  9. Taylor BlauSep 19, 2023
  10. Taylor BlauSep 15, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.