aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-06-19 00:56:21 +0800
committerGitHub <noreply@github.com>2023-06-18 16:56:21 +0000
commite0bd6ebabdcfa45113beb0f3cc28362e62011716 (patch)
tree32f700ec14d8279949435aa5019b3b030505199d
parentcc73f6e82129d79b77b25492d6694a1abedfc099 (diff)
downloadgitea-e0bd6ebabdcfa45113beb0f3cc28362e62011716.tar.gz
gitea-e0bd6ebabdcfa45113beb0f3cc28362e62011716.zip
Fix incorrect config argument position for builtin SSH server (#25341)
The "--config" option is a global option, it shouldn't appear at the end. Otherwise it might not be respected in some cases. Caught by #25330 and use a separate PR to fix it for 1.20
-rw-r--r--modules/ssh/ssh.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go
index 4bf57eafb7..923fa51d22 100644
--- a/modules/ssh/ssh.go
+++ b/modules/ssh/ssh.go
@@ -68,7 +68,7 @@ func sessionHandler(session ssh.Session) {
log.Trace("SSH: Payload: %v", command)
- args := []string{"serv", "key-" + keyID, "--config=" + setting.CustomConf}
+ args := []string{"--config=" + setting.CustomConf, "serv", "key-" + keyID}
log.Trace("SSH: Arguments: %v", args)
ctx, cancel := context.WithCancel(session.Context())