Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
Needed fix described in issue go-gitea#6889
  • Loading branch information
sapk authored May 9, 2019
1 parent 617b839 commit 5824a5a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions modules/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,6 @@ func handleServerConn(keyID string, chans <-chan ssh.NewChannel) {
for req := range in {
payload := cleanCommand(string(req.Payload))
switch req.Type {
/*
//Disabled as it doesn't do anything to sub-sequent calls
//TODO fix by populating an array of env to be added at cmd.Env of exec calls
case "env":
args := strings.Split(strings.Replace(payload, "\x00", "", -1), "\v")
if len(args) != 2 {
log.Warn("SSH: Invalid env arguments: '%#v'", args)
continue
}
args[0] = strings.TrimLeft(args[0], "\x04")
_, _, err := com.ExecCmdBytes("env", args[0]+"="+args[1])
if err != nil {
log.Error("env: %v", err)
return
}
*/
case "exec":
cmdName := strings.TrimLeft(payload, "'()")
log.Trace("SSH: Payload: %v", cmdName)
Expand Down

0 comments on commit 5824a5a

Please sign in to comment.