Potential security flaw

I am using go-jet as a go library for an application that uses dynamic database credentials and noticed this potential security risk that exposes the whole database credentials (though it is timed, it is still a risk)
This commit is contained in:
S T E P H E N 2022-10-24 22:43:10 +01:00 committed by GitHub
parent 24857bc067
commit 9bc090b7a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,7 @@ func GenerateDSN(dsn, schema, destDir string, templates ...template.Template) (e
} }
func openConnection(dsn string) *sql.DB { func openConnection(dsn string) *sql.DB {
fmt.Println("Connecting to postgres database: " + dsn) fmt.Printf("Connecting to postgres database: %v...", dsn[:15])
db, err := sql.Open("postgres", dsn) db, err := sql.Open("postgres", dsn)
throw.OnError(err) throw.OnError(err)