summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-03-29 14:42:20 -0600
committerMatthew Holt <[email protected]>2024-03-29 14:42:20 -0600
commit7b48ce0e7e397e024eac9b542d00b103040ef6b6 (patch)
tree00015cf39a796d4f55846436dddfd68d3d31e062
parent924010cd3d1e0269cd89f3d7531e375ebbf11a3c (diff)
downloadcaddy-7b48ce0e7e397e024eac9b542d00b103040ef6b6.tar.gz
caddy-7b48ce0e7e397e024eac9b542d00b103040ef6b6.zip
caddyhttp: Replace sensitive headers with REDACTED (close #5669)
-rw-r--r--modules/caddyhttp/marshalers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/marshalers.go b/modules/caddyhttp/marshalers.go
index 8f4472a27..c985bb926 100644
--- a/modules/caddyhttp/marshalers.go
+++ b/modules/caddyhttp/marshalers.go
@@ -75,7 +75,7 @@ func (h LoggableHTTPHeader) MarshalLogObject(enc zapcore.ObjectEncoder) error {
if !h.ShouldLogCredentials {
switch strings.ToLower(key) {
case "cookie", "set-cookie", "authorization", "proxy-authorization":
- val = []string{}
+ val = []string{"REDACTED"} // see #5669. I still think ▒▒▒▒ would be cool.
}
}
enc.AddArray(key, LoggableStringArray(val))