Skip to content

Commit

Permalink
Fix incorrect config argument position for builtin SSH server (#25341)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wxiaoguang authored Jun 18, 2023
1 parent cc73f6e commit e0bd6eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit e0bd6eb

Please sign in to comment.