aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ssh/ssh.go
diff options
context:
space:
mode:
authorBruno <bruno@robotinfra.com>2015-12-13 19:15:10 +0800
committerBruno <bruno@robotinfra.com>2015-12-13 20:17:47 +0800
commit9a27e5ccdc029ae6c0cb7db9c59f1e259d90bc99 (patch)
tree834df8d26d26f73184e8e77822a89aad7d1d1e10 /modules/ssh/ssh.go
parent71123c816df2c75afdefaf316e8d808d38e6e97f (diff)
downloadgitea-9a27e5ccdc029ae6c0cb7db9c59f1e259d90bc99.tar.gz
gitea-9a27e5ccdc029ae6c0cb7db9c59f1e259d90bc99.zip
ignore invalid env
Diffstat (limited to 'modules/ssh/ssh.go')
-rw-r--r--modules/ssh/ssh.go3
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])