Missing Handler causes panic
- Dominant language
- Go
- Stars
- 4.2k
- Forks
- 509
- PR merge metrics
- No merged PRs in 30d
Description
When I try to connect to a server without specifying a handler on the server. I only defined `SubsystemHandlers` just like it is shown in the [SFTP example](https://github.com/gliderlabs/ssh/blob/adec695b0aa80b0a03f251e1f8c302f0ea192ef5/_examples/ssh-sftpserver/sftp.go#L37-L39).
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x100961b94]
goroutine 44 [running]:
github.com/gliderlabs/ssh.(*session).handleRequests.func1()
/Users/lgorog/go/pkg/mod/github.com/gliderlabs/ssh@v0.3.7/session.go:261 +0x24
created by github.com/gliderlabs/ssh.(*session).handleRequests in goroutine 24
/Users/lgorog/go/pkg/mod/github.com/gliderlabs/ssh@v0.3.7/session.go:260 +0x518
```
It would be better to detect it when Listen starts or even better just immediately close/reject the connection.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.