]> git.ipfire.org Git - thirdparty/git.git/commit - pkt-line.c
fetch-pack: redact packfile urls in traces
authorIvan Frade <ifrade@google.com>
Wed, 10 Nov 2021 23:51:28 +0000 (23:51 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Nov 2021 18:07:43 +0000 (10:07 -0800)
commit88e9b1e3fcbd3a8edcf1d54528c49f8237906aba
tree7fdb889a781c5e3b6f57a85a9cde0c4a861eec11
parente9e5ba39a78c8f5057262d49e261b42a8660d5b9
fetch-pack: redact packfile urls in traces

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 URL paths 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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt
fetch-pack.c
pkt-line.c
pkt-line.h
t/t5702-protocol-v2.sh