From 230478aae947c86f4c6f1f251dcb30aeb1293283 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 7 Jul 2022 18:04:16 +0200 Subject: [PATCH] fix: remove credential escaping for postgres connections to allow for passwords with special characters Resolves https://github.com/go-vikunja/api/issues/22 --- pkg/db/db.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/db/db.go b/pkg/db/db.go index ab532979..54de35b0 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -19,7 +19,6 @@ package db import ( "encoding/gob" "fmt" - "net/url" "os" "strconv" "strings" @@ -153,8 +152,8 @@ func initPostgresEngine() (engine *xorm.Engine, err error) { connStr := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=%s sslcert=%s sslkey=%s sslrootcert=%s", host, port, - url.PathEscape(config.DatabaseUser.GetString()), - url.PathEscape(config.DatabasePassword.GetString()), + config.DatabaseUser.GetString(), + config.DatabasePassword.GetString(), config.DatabaseDatabase.GetString(), config.DatabaseSslMode.GetString(), config.DatabaseSslCert.GetString(),