diff options
author | Unknwon <u@gogs.io> | 2015-12-13 07:21:45 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-13 07:21:45 -0500 |
commit | 42a8c15ad0717d02c6b1b3e35363901c5bd781dc (patch) | |
tree | 834df8d26d26f73184e8e77822a89aad7d1d1e10 | |
parent | 71123c816df2c75afdefaf316e8d808d38e6e97f (diff) | |
parent | 9a27e5ccdc029ae6c0cb7db9c59f1e259d90bc99 (diff) | |
download | gitea-42a8c15ad0717d02c6b1b3e35363901c5bd781dc.tar.gz gitea-42a8c15ad0717d02c6b1b3e35363901c5bd781dc.zip |
Merge pull request #2169 from bclermont/develop
Ignore invalid env for SSH Server (OSX fix)
-rw-r--r-- | modules/ssh/ssh.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/ssh/ssh.go b/modules/ssh/ssh.go index 12e5892945..68cbeaeacb 100644 --- a/modules/ssh/ssh.go +++ b/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]) |