[PATCH 0/2] fetch-pack: redact packfile urls in traces
- From
Ivan Frade via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Oct 8, 2021, 16:03 UTC
- Message-ID
- <pull.1052.git.1633708986.gitgitgadget@gmail.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.
Signed-off-by: Ivan Frade ifrade@google.com
Ivan Frade (2): fetch-pack: redact packfile urls in traces Documentation: packfile-uri hash can be longer than 40 hex chars
Documentation/technical/protocol-v2.txt | 8 ++--- fetch-pack.c | 11 +++++++ http-fetch.c | 4 ++- pkt-line.c | 7 +++- pkt-line.h | 1 + t/t5702-protocol-v2.sh | 43 +++++++++++++++++++++++++ 6 files changed, 68 insertions(+), 6 deletions(-)
base-commit: 0785eb769886ae81e346df10e88bc49ffc0ac64e Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1052%2Fifradeo%2Fredact-packfile-uri-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1052/ifradeo/redact-packfile-uri-v1 Pull-Request: https://github.com/gitgitgadget/git/pull/1052
-- gitgitgadget