Skip to content

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

From: Ivan Frade <ifrade@google.com>

In some setups, packfile uris act as bearer token. It is not
recommended to expose them plainly in logs, although in special
circunstances (e.g. debug) it makes sense to write them.

Redact the packfile-uri lines by default, unless the GIT_TRACE_REDACT
variable is set to false. This mimics the redacting of the
Authorization header in HTTP.

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

Signed-off-by: Ivan Frade <ifrade@google.com>

Submitted-As: https://lore.kernel.org/git/pull.1052.v2.git.1633746024175.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1052.git.1633708986.gitgitgadget@gmail.com
Assets 2