mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
escaping ssl mode on postgres param
This commit is contained in:
parent
bfd05ba6ec
commit
26aa575cb4
@ -53,7 +53,11 @@ func generateConnectionString(datasource *models.DataSource) string {
|
||||
}
|
||||
|
||||
sslmode := datasource.JsonData.Get("sslmode").MustString("verify-full")
|
||||
u := &url.URL{Scheme: "postgres", User: url.UserPassword(datasource.User, password), Host: datasource.Url, Path: datasource.Database, RawQuery: "sslmode=" + sslmode}
|
||||
u := &url.URL{Scheme: "postgres",
|
||||
User: url.UserPassword(datasource.User, password),
|
||||
Host: datasource.Url, Path: datasource.Database,
|
||||
RawQuery: "sslmode=" + url.QueryEscape(sslmode)}
|
||||
|
||||
return u.String()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user