mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Don't log private SSH key
Log files may have more inclusive permissions than private SSH keys, and as such we should not log the key, even if it looks invalid.
This commit is contained in:
parent
62c737324e
commit
df42b984d4
@ -233,7 +233,7 @@ func MakePrivateKeySignerFromFile(key string) (ssh.Signer, error) {
|
||||
func MakePrivateKeySignerFromBytes(buffer []byte) (ssh.Signer, error) {
|
||||
signer, err := ssh.ParsePrivateKey(buffer)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error parsing SSH key %s: '%v'", buffer, err)
|
||||
return nil, fmt.Errorf("error parsing SSH key: '%v'", err)
|
||||
}
|
||||
return signer, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user