Skip to content

Commit

Permalink
perf: fix check token id failed
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Dec 18, 2024
1 parent 2f8f00d commit 579933e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/handler/server_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (s *Server) proxyAssetCommand(sess ssh.Session, sshClient *srvconn.SSHClien
}
ctx, cancel := context.WithCancel(sess.Context())
defer cancel()

respSession.TokenId = tokenInfo.Id
traceSession := session.NewSession(&respSession, func(task *model.TerminalTask) error {
switch task.Name {
case model.TaskKillSession:
Expand Down
1 change: 1 addition & 0 deletions pkg/srvconn/sftp_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ func (ad *AssetDir) createSftpSession(su *model.PermAccount) (sftpSess *SftpSess
logger.Errorf("Create sftp Session err: %s", err1.Error())
return nil, err1
}
respSession.TokenId = conn.token.Id
sftpSession := &SftpSession{SftpConn: conn, sess: &respSession, jmsService: ad.jmsService}
terminalFunc := func(task *model.TerminalTask) error {
switch task.Name {
Expand Down

0 comments on commit 579933e

Please sign in to comment.