Skip to content

Commit

Permalink
Prevent ssh option injection
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilst committed May 14, 2024
1 parent bab7625 commit 3b8bccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/sshproxy/sshproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ func mainExitCode() int {
if doCmd == fromCmd {
log.Debugf("translateCmdConf = %+v", translateCmdConf)
sshArgs = append(sshArgs, translateCmdConf.SSHArgs...)
sshArgs = append(sshArgs, "--", host, translateCmdConf.Command)
sshArgs = append(sshArgs, host, "--", translateCmdConf.Command)
if config.Dump != "" && translateCmdConf.DisableDump {
config.Dump = "etcd"
}
Expand All @@ -487,7 +487,7 @@ func mainExitCode() int {
// Force TTY allocation because the user probably asked for it.
sshArgs = append(sshArgs, "-t")
}
sshArgs = append(sshArgs, host, doCmd)
sshArgs = append(sshArgs, host, "--", doCmd)
}
} else {
sshArgs = append(sshArgs, host)
Expand Down
2 changes: 1 addition & 1 deletion test/centos-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:latest
FROM fedora:39

# Install development environment to compile RPM
RUN set -ex \
Expand Down

0 comments on commit 3b8bccc

Please sign in to comment.