From 9bc090b7a3394ae5c4ba863f426f9a4bb5cb60ea Mon Sep 17 00:00:00 2001 From: S T E P H E N <47150226+yngfoxx@users.noreply.github.com> Date: Mon, 24 Oct 2022 22:43:10 +0100 Subject: [PATCH] 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) --- generator/postgres/postgres_generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/postgres/postgres_generator.go b/generator/postgres/postgres_generator.go index 1c3e885..652851c 100644 --- a/generator/postgres/postgres_generator.go +++ b/generator/postgres/postgres_generator.go @@ -69,7 +69,7 @@ func GenerateDSN(dsn, schema, destDir string, templates ...template.Template) (e } 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) throw.OnError(err)