Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Commit

Permalink
Fixed incorrect request types (#14)
Browse files Browse the repository at this point in the history
In the previous version the SSH server would listen for several incorrect request types, for example PTY, signals, and subsystems. These are now fixed.
  • Loading branch information
Janos Pasztor authored Dec 13, 2020
1 parent 17a2b6c commit 870c3eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.9.14: Fixed incorrect request types

In the previous version the SSH server would listen for several incorrect request types, for example PTY, signals, and subsystems. These are now fixed.

## 0.9.13: Fixed race condition on channel requests

The previous version of this library would handle channel requests in parallel goroutines. This would sometimes lead to shell/exec/subsystem requests being processed before PTY requests. This release changes that and requests are now always processed in order.
Expand Down
6 changes: 3 additions & 3 deletions server_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ type requestType string

const (
requestTypeEnv requestType = "env"
requestTypePty requestType = "pty"
requestTypePty requestType = "pty-req"
requestTypeShell requestType = "shell"
requestTypeExec requestType = "exec"
requestTypeSubsystem requestType = "Subsystem"
requestTypeSubsystem requestType = "subsystem"
requestTypeWindow requestType = "window-change"
requestTypeSignal requestType = "Signal"
requestTypeSignal requestType = "signal"
)

func (s *server) handleSessionChannel(channelID uint64, newChannel ssh.NewChannel, connection SSHConnectionHandler) {
Expand Down

0 comments on commit 870c3eb

Please sign in to comment.