Browse Source

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
tags/v1.20.0-rc1
wxiaoguang 11 months ago
parent
commit
e0bd6ebabd
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      modules/ssh/ssh.go

+ 1
- 1
modules/ssh/ssh.go View File

@@ -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())

Loading…
Cancel
Save