fix: remove credential escaping for postgres connections to allow for passwords with special characters

Resolves https://github.com/go-vikunja/api/issues/22
This commit is contained in:
kolaente 2022-07-07 18:04:16 +02:00
parent 7e99618319
commit 230478aae9
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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(),