mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-29 15:59:10 +01:00
[client] Refuse path-bearing locale, TERM and TZ values from SSH clients (#8388)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user