aboutsummaryrefslogtreecommitdiffstats
path: root/routers/init.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-11-06 07:23:32 +0100
committerGitHub <noreply@github.com>2021-11-06 14:23:32 +0800
commitbd613c704c0d74352d427ab32369310a04f5b721 (patch)
tree56a2184ba9d11a9170fa7b37b601992e90d6b6be /routers/init.go
parent5e0cf4b82e10e72cd9754326e3183409afdb736c (diff)
downloadgitea-bd613c704c0d74352d427ab32369310a04f5b721.tar.gz
gitea-bd613c704c0d74352d427ab32369310a04f5b721.zip
Fix ipv6 parsing for builtin ssh server (#17561)
Diffstat (limited to 'routers/init.go')
-rw-r--r--routers/init.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/init.go b/routers/init.go
index a4f5f606ba..1e2b7a02f6 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -6,8 +6,10 @@ package routers
import (
"context"
+ "net"
"reflect"
"runtime"
+ "strconv"
"strings"
"code.gitea.io/gitea/models"
@@ -155,7 +157,9 @@ func GlobalInit(ctx context.Context) {
if setting.SSH.StartBuiltinServer {
ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
- log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
+ log.Info("SSH server started on %s. Cipher list (%v), key exchange algorithms (%v), MACs (%v)",
+ net.JoinHostPort(setting.SSH.ListenHost, strconv.Itoa(setting.SSH.ListenPort)),
+ setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs)
} else {
ssh.Unused()
}