Skip to content

Commit

Permalink
fix(ssh): fix nil segv
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Dec 11, 2023
1 parent 0fd07d0 commit 9b6fb3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/dpsproxy-server/components/GenerateRoute.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
</div>
<small
>Do not share the long-lived token. A third party could re-use this token to
hijack the route. Fetching a new route will delete old tokens. Generated
token and established connections persist after the token is expired.</small
hijack the route. As a security measure, fetching a route will delete old
tokens. Note also that established connections persist after the token is
expired.</small
>
<input type="submit" value="Fetch route" />
</form>
Expand Down
1 change: 1 addition & 0 deletions ssh/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func (s *Server) Serve(ctx context.Context) error {
sshConn, chans, reqs, err := ssh.NewServerConn(conn, s.ServerConfig)
if err != nil {
log.Warn().Err(err).Msg("ssh failure")
return
}
defer sshConn.Close()
client := &client{
Expand Down

0 comments on commit 9b6fb3e

Please sign in to comment.