diff options
author | Ivan Frade <ifrade@google.com> | 2021-11-10 23:51:28 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-11 10:07:43 -0800 |
commit | 88e9b1e3fcbd3a8edcf1d54528c49f8237906aba (patch) | |
tree | 7fdb889a781c5e3b6f57a85a9cde0c4a861eec11 /pkt-line.h | |
parent | e9e5ba39a78c8f5057262d49e261b42a8660d5b9 (diff) | |
download | git-88e9b1e3fcbd3a8edcf1d54528c49f8237906aba.tar.gz |
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>
Diffstat (limited to 'pkt-line.h')
-rw-r--r-- | pkt-line.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkt-line.h b/pkt-line.h index 467ae01357..6d2a63db23 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -87,6 +87,7 @@ void packet_fflush(FILE *f); #define PACKET_READ_CHOMP_NEWLINE (1u<<1) #define PACKET_READ_DIE_ON_ERR_PACKET (1u<<2) #define PACKET_READ_GENTLE_ON_READ_ERROR (1u<<3) +#define PACKET_READ_REDACT_URI_PATH (1u<<4) int packet_read(int fd, char *buffer, unsigned size, int options); /* |