mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 15:50:57 +03:00
Merge pull request #20 from cloudera/forUpstream
Don't leak PrivateKeyStringResource private keys via toString()
This commit is contained in:
@@ -29,4 +29,11 @@ public class PrivateKeyStringResource extends Resource<String> {
|
||||
public Reader getReader() throws IOException {
|
||||
return new StringReader(getDetail());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// If not overridden, the superclass's will return the private key as
|
||||
// part of the string.
|
||||
return "[" + getClass().getSimpleName() + "]";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user