We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9013059 commit 0a90c1eCopy full SHA for 0a90c1e
pkg/configs/db/db.go
@@ -6,6 +6,7 @@ import (
6
"fmt"
7
"net/url"
8
"os"
9
+ "strings"
10
11
"github.com/cortexproject/cortex/pkg/configs/db/memory"
12
"github.com/cortexproject/cortex/pkg/configs/db/postgres"
@@ -77,7 +78,8 @@ func New(cfg Config) (DB, error) {
77
78
if err != nil {
79
return nil, fmt.Errorf("Could not read database password file: %v", err)
80
}
- u.User = url.UserPassword(u.User.Username(), string(passwordBytes))
81
+ password := strings.TrimSpace(string(passwordBytes))
82
+ u.User = url.UserPassword(u.User.Username(), password)
83
84
85
var d DB
0 commit comments