More evil inputs.

This commit is contained in:
Andrey Petrov 2014-12-12 19:33:30 -08:00
parent cfbd2824e6
commit d30d971ea2

View File

@ -9,6 +9,8 @@ import (
"sync" "sync"
"time" "time"
"code.google.com/p/rog-go/new9p/client"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
) )
@ -240,7 +242,11 @@ func (s *Server) Start(laddr string) error {
return return
} }
logger.Infof("Connection #%d from: %s, %s, %s", s.count+1, sshConn.RemoteAddr(), sshConn.User(), sshConn.ClientVersion()) version := client.Conn.ClientVersion()
if len(version) > 100 {
version = []byte("Evil Jerk with a superlong string")
}
logger.Infof("Connection #%d from: %s, %s, %s", s.count+1, sshConn.RemoteAddr(), sshConn.User(), version)
go ssh.DiscardRequests(requests) go ssh.DiscardRequests(requests)