From: vlsi (@vlsi) <noreply+vlsi@github.com>
To: pgjdbc/pgjdbc <noreply+pgjdbc-pgjdbc@github.com>
Subject: Re: [pgjdbc/pgjdbc] PR #4512: fix: mask credentials in the JDBC URLs the driver logs
Date: Thu, 05 Nov 2026 12:10:27 +0000
Message-ID: <gh-pgjdbc-pgjdbc-4512-rc4480244884@github.com> (raw)
In-Reply-To: <gh-pgjdbc-pgjdbc-4512@github.com>
References: <gh-pgjdbc-pgjdbc-4512@github.com>
(on pgjdbc/src/main/java/org/postgresql/Driver.java)
**major**: another driver's URL is still logged with its credentials
`acceptsURL` (and `getPropertyInfo`) pass any URL to `parseURL`, and `DriverManager.getDriver(url)` calls `acceptsURL` on every registered driver, so this record is written for URLs meant for other drivers. `maskSensitiveValues` only knows the `?name=value&...` syntax, so `jdbc:sqlserver://h;user=u;password=p` and `jdbc:oracle:thin:u/p@h:1521/x` reach the `FINE` log unchanged. Please drop the URL from this record, for example `JDBC URL does not start with "jdbc:postgresql:"`, and add a test: no test covers this record now.