From 7b48ce0e7e397e024eac9b542d00b103040ef6b6 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 29 Mar 2024 14:42:20 -0600 Subject: [PATCH] caddyhttp: Replace sensitive headers with REDACTED (close #5669) --- modules/caddyhttp/marshalers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/marshalers.go b/modules/caddyhttp/marshalers.go index 8f4472a2..c985bb92 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))