mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-22 05:24:29 +02:00
sshd: Fix env error check
Co-Authored-By: Chris Miller <millerlogic@users.noreply.github.com>
This commit is contained in:
parent
4aa2460d82
commit
6701cbcbf7
@ -189,7 +189,7 @@ func (t *Terminal) listen(requests <-chan *ssh.Request) {
|
|||||||
}
|
}
|
||||||
case "env":
|
case "env":
|
||||||
var v EnvVar
|
var v EnvVar
|
||||||
if err := ssh.Unmarshal(req.Payload, &v); err != nil {
|
if err := ssh.Unmarshal(req.Payload, &v); err == nil {
|
||||||
t.mu.Lock()
|
t.mu.Lock()
|
||||||
t.env = append(t.env, v)
|
t.env = append(t.env, v)
|
||||||
t.mu.Unlock()
|
t.mu.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user