mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 16:18:05 +03:00
Don't leak PrivateKeyStringResource private keys via toString()
This commit is contained in:
committed by
Philip Langdale
parent
dc70f08e45
commit
4be02450dd
@@ -29,4 +29,11 @@ public class PrivateKeyStringResource extends Resource<String> {
|
|||||||
public Reader getReader() throws IOException {
|
public Reader getReader() throws IOException {
|
||||||
return new StringReader(getDetail());
|
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