Browse Source

Merge pull request #2169 from bclermont/develop

Ignore invalid env for SSH Server (OSX fix)
Unknwon 9 years ago
parent
commit
42a8c15ad0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/ssh/ssh.go

+ 2 - 1
modules/ssh/ssh.go

@@ -53,7 +53,8 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
 				case "env":
 					args := strings.Split(strings.Replace(payload, "\x00", "", -1), "\v")
 					if len(args) != 2 {
-						return
+						log.Warn("Invalid env arguments: '%#v'", args)
+						continue
 					}
 					args[0] = strings.TrimLeft(args[0], "\x04")
 					_, _, err := com.ExecCmdBytes("env", args[0]+"="+args[1])