Skip to content

Missing Handler causes panic #237

Description

@nerg4l

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/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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions