Skip to content

pr-1052/ifradeo/redact-packfile-uri-v7

Changes since v6:

 * Use specific hash sizes instead of hexsz
 * Remove unnecessary env vars in tests
 * Added comment on bit toggle

Changes since v5:

 * Use hexsz instead of hardcoded hash sizes

Changes since v4:

 * Use "uri" instead of "url"
 * Look specifically for a line with packfile-uri format (instead of for a
   URL in general)
 * Limit the redacting to the packfile-uri section in do_fetch_pack_v2
 * Use "%.*s" instead of duplicating parts of the string to print

Changes since v3:

 * Enable redacting URLs for all sections
 * Redact only URL path (it was until the end of line)
 * Redact URL in die() with more friendly message
 * Update doc to mention that packfile URIs are also redacted.

Changes since v2:

 * Redact only the path of the URL
 * Test are now strict, validating the exact line expected in the log

Changes since v1:

 * Removed non-POSIX flags in tests
 * More accurate regex for the non-encrypted packfile line
 * Dropped documentation change
 * Dropped redacting the die message in http-fetch

Ivan Frade (2):
  fetch-pack: redact packfile urls in traces
  http-fetch: redact url on die() message

 Documentation/git.txt  |  5 +++--
 fetch-pack.c           |  5 +++++
 http-fetch.c           | 14 ++++++++++--
 pkt-line.c             | 40 ++++++++++++++++++++++++++++++++-
 pkt-line.h             |  1 +
 t/t5702-protocol-v2.sh | 51 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 111 insertions(+), 5 deletions(-)

base-commit: 88d915a634b449147855041d44875322de2b286d

Submitted-As: https://lore.kernel.org/git/pull.1052.v7.git.1636588289.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.git.1633708986.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.v2.git.1633746024175.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.v3.git.1634684260142.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.v4.git.1635288599.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.v5.git.1635461500.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.v6.git.1635532975.gitgitgadget@gmail.com
Assets 2