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:
parent
7e99618319
commit
230478aae9
1 changed files with 2 additions and 3 deletions
|
@ -19,7 +19,6 @@ package db
|
||||||
import (
|
import (
|
||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"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",
|
connStr := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=%s sslcert=%s sslkey=%s sslrootcert=%s",
|
||||||
host,
|
host,
|
||||||
port,
|
port,
|
||||||
url.PathEscape(config.DatabaseUser.GetString()),
|
config.DatabaseUser.GetString(),
|
||||||
url.PathEscape(config.DatabasePassword.GetString()),
|
config.DatabasePassword.GetString(),
|
||||||
config.DatabaseDatabase.GetString(),
|
config.DatabaseDatabase.GetString(),
|
||||||
config.DatabaseSslMode.GetString(),
|
config.DatabaseSslMode.GetString(),
|
||||||
config.DatabaseSslCert.GetString(),
|
config.DatabaseSslCert.GetString(),
|
||||||
|
|
Loading…
Reference in a new issue