Files
substrate/cmd/ateapi
Da Huang 38b9522fea ateapi: stop logging the raw PostgreSQL connection string (which might contain db password) at startup (#1833)
logFlagValues writes every flag to the log when the server starts, and
that included --postgres-connection-string verbatim. The bundled
database and Cloud SQL IAM auth use passwordless strings, but an
external database DSN can carry a password, and it was written to the
log on every restart.

Log the parsed, non-secret parts instead: host, port, database, user,
whether a password is set and whether TLS is on. pgconn.ParseConfig
handles both the URI and the libpq key=value forms, so no string
rewriting is needed and nothing is echoed. A string that does not parse
is logged as "<unparseable>"; connectStore still reports the real error.

Fixes #1832

> It's a good idea to open an issue first for discussion.

- [x] Tests pass
- [x] Appropriate changes to documentation are included in the PR
2026-10-01 14:04:22 +00:00
..