fix: sanitize JWT error to prevent JWKS URL leak in 403 response

This commit is contained in:
Admin Bot
2026-09-05 00:31:37 -07:00
parent 2bcf6c82fc
commit dd9356c669
+1 -1
View File
@@ -323,7 +323,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
writeProblemDetail(w, http.StatusForbidden,
"https://api.example.com/problems/forbidden",
"Forbidden",
fmt.Sprintf("JWT validation failed: %v", err),
"JWT validation failed",
nil)
logging.Errorf("auth failed", err, map[string]string{
"path": r.URL.Path,