Files
Checkmate/client
gorkem-bwl 741ee7a92a fix(security): redact sensitive fields from client-side logs
Failed requests logged the full request body to the browser console, so a
failing POST to /auth/login wrote the user's plaintext password where it
could be captured by error-reporting tools, screen shares, or support
sessions.

Redaction is applied centrally in the logger rather than at the call sites,
so every current and future caller is covered:

- createLogData() redacts context before it is serialized, covering the
  JSON branches of error() and warn().
- The debug-level branches of error() and warn() printed the raw context
  object directly, bypassing createLogData(); they now print the redacted
  copy.
- debug() and info() redact their free-form data argument.

Keys are matched case-insensitively on a substring after stripping dashes
and underscores, so password, newPassword, X-Api-Key and Authorization are
all caught. The walk copies rather than mutates the caller's object, cuts
genuine cycles without mislabelling repeated siblings, and renders
FormData/Blob as a type marker instead of walking them.

Affected paths were POST (/auth/login, /auth/register) and PATCH/PUT, which
carry monitor secrets. Error-level logging is on by default, so this was
not limited to debug builds.

Fixes #3843
2026-08-17 12:27:02 -04:00
..
2025-04-20 11:29:53 -07:00
2025-04-20 11:29:53 -07:00
2026-07-09 10:21:09 -07:00
2025-04-20 11:29:53 -07:00
2026-07-28 09:48:31 -07:00
2026-07-28 09:48:31 -07:00
2025-05-27 09:10:32 -07:00
2025-05-27 09:10:32 -07:00
2025-09-26 14:36:15 -07:00
2025-09-26 14:22:25 -07:00

This directory contains the client side (frontend) of Checkmate.