Merge pull request #20 from cloudera/forUpstream

Don't leak PrivateKeyStringResource private keys via toString()
This commit is contained in:
Shikhar Bhushan
2011-06-23 13:46:37 -07:00

View File

@@ -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() + "]";
}
}