This commit is contained in:
Alex Craig 2025-04-03 21:15:07 -04:00 committed by GitHub
commit 2c7a6cc1ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -216,5 +216,14 @@ func loggableDSN(dsn string) string {
pDSN.User = url.UserPassword(pDSN.User.Username(), "PASSWORD_REMOVED")
}
// Blank password data from parameters if not nil
q := pDSN.Query()
if q != nil {
if q.Get("password") != "" {
q.Set("password", "PASSWORD_REMOVED")
pDSN.RawQuery = q.Encode()
}
}
return pDSN.String()
}