Skip to content

Commit 42a8c15

Browse files
committed
Merge pull request #2169 from bclermont/develop
Ignore invalid env for SSH Server (OSX fix)
2 parents 71123c8 + 9a27e5c commit 42a8c15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/ssh/ssh.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
5353
case "env":
5454
args := strings.Split(strings.Replace(payload, "\x00", "", -1), "\v")
5555
if len(args) != 2 {
56-
return
56+
log.Warn("Invalid env arguments: '%#v'", args)
57+
continue
5758
}
5859
args[0] = strings.TrimLeft(args[0], "\x04")
5960
_, _, err := com.ExecCmdBytes("env", args[0]+"="+args[1])

0 commit comments

Comments
 (0)