Skip to content

Commit 866d0dd

Browse files
M1YTbelak
authored andcommitted
Ensure user information is available in KeyboardInteractive callback
Fixes #116
1 parent 5b6cc70 commit 866d0dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func (srv *Server) config(ctx Context) *gossh.ServerConfig {
130130
}
131131
if srv.KeyboardInteractiveHandler != nil {
132132
config.KeyboardInteractiveCallback = func(conn gossh.ConnMetadata, challenger gossh.KeyboardInteractiveChallenge) (*gossh.Permissions, error) {
133+
applyConnMetadata(ctx, conn)
133134
if ok := srv.KeyboardInteractiveHandler(ctx, challenger); !ok {
134135
return ctx.Permissions().Permissions, fmt.Errorf("permission denied")
135136
}

0 commit comments

Comments
 (0)