Files
troubleshoot/pkg
Salah Al SalehandClaude Opus 5 ff9a7f87b8 fix(redactors): mask connection strings without a trailing database name (#2125)
* fix(redactors): mask connection strings without a trailing database name

The built-in redactors that mask credentials in a database URI only match
when a trailing /db-name is present, so `postgres://user:pass@host:5432`
and `user:pass@tcp(host:3306)` were written to bundles unredacted.

Generalize the URI credential redactor from http/https/ftp to any scheme,
since it does not require a path, and add a companion redactor for the
MySQL DSN form. The existing redactors that also mask the host and
database name are unchanged, so URIs with a database name redact exactly
as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(redactors): mask slashes and colons in mysql DSN passwords

The password in the no-database-name DSN redactor stopped at the first
slash or colon, so `user:p/ass@tcp(host:3306)` was left unredacted. Run
the password to the @ instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(redactors): mask mysql DSNs over tcp4, tcp6 and unix sockets

Both DSN redactors only matched the tcp network type, so credentials in
`user:pass@tcp6([::1]:3306)` and `user:pass@unix(/path/mysqld.sock)/db`
were left unredacted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 11:25:07 -07:00
..
2026-05-13 22:57:16 +01:00
2025-10-08 10:22:11 -07:00
2023-02-10 17:27:50 +00:00
2025-10-08 10:22:11 -07:00
2025-07-09 20:58:47 -04:00
2026-01-14 14:36:04 -06:00
2025-10-08 10:22:11 -07:00
2025-10-08 10:22:11 -07:00