[client] Refuse path-bearing locale, TERM and TZ values from SSH clients (#8388)

This commit is contained in:
Viktor Liu
2026-10-28 16:38:10 +01:00
committed by GitHub
parent e2ee1dd002
commit 42418448d8
4 changed files with 85 additions and 9 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ func (s *Server) createDirectPtyCommand(session ssh.Session, localUser *user.Use
// preparePtyEnv prepares environment variables for Pty execution
func (s *Server) preparePtyEnv(localUser *user.User, ptyReq ssh.Pty, session ssh.Session) []string {
termType := ptyReq.Term
if termType == "" {
if termType == "" || !acceptEnv("TERM="+termType) {
termType = "xterm-256color"
}