Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Handler causes panic #237

Open
nerg4l opened this issue Sep 29, 2024 · 0 comments · May be fixed by #238
Open

Missing Handler causes panic #237

nerg4l opened this issue Sep 29, 2024 · 0 comments · May be fixed by #238

Comments

@nerg4l
Copy link

nerg4l commented Sep 29, 2024

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.

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/[email protected]/session.go:261 +0x24
created by github.com/gliderlabs/ssh.(*session).handleRequests in goroutine 24
        /Users/lgorog/go/pkg/mod/github.com/gliderlabs/[email protected]/session.go:260 +0x518

It would be better to detect it when Listen starts or even better just immediately close/reject the connection.

@nerg4l nerg4l linked a pull request Sep 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant