]> git.ipfire.org Git - thirdparty/git.git/commit
http-fetch: redact url on die() message
authorIvan Frade <ifrade@google.com>
Wed, 10 Nov 2021 23:51:29 +0000 (23:51 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Nov 2021 18:07:44 +0000 (10:07 -0800)
commit0ba558ffb138f893f786d42b19689898ef456515
treef884b9b9738ff448a3e07f548fd58590cc9162de
parent88e9b1e3fcbd3a8edcf1d54528c49f8237906aba
http-fetch: redact url on die() message

http-fetch prints the URL after failing to fetch it. This can be
confusing to users (they cannot really do anything with it), and they
can share by accident a sensitive URL (e.g. with credentials) while
looking for help.

Redact the URL unless the GIT_TRACE_REDACT variable is set to false. This
mimics the redaction of other sensitive information in git, like the
Authorization header in HTTP.

Fix also capitalization of previous die() message (must start in
lowercase).

Signed-off-by: Ivan Frade <ifrade@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-fetch.c