1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-06 02:27:20 +00:00

Fix panic when parsing empty pgsql host (#28708) (#28709)

Backport #28708 by wxiaoguang

Regression of #27723
Fix #28705

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-01-06 20:05:49 +08:00
committed by GitHub
parent e67c819cf4
commit 7f833d8f71
2 changed files with 5 additions and 1 deletions

View File

@ -65,6 +65,10 @@ func Test_getPostgreSQLConnectionString(t *testing.T) {
SSLMode string
Output string
}{
{
Host: "", // empty means default
Output: "postgres://:@127.0.0.1:5432?sslmode=",
},
{
Host: "/tmp/pg.sock",
User: "testuser",