Skip to content

Commit

Permalink
Don't log private SSH key
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tallclair committed Apr 19, 2016
1 parent 62c7373 commit df42b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit df42b98

Please sign in to comment.