[FIXED SECURITY-93] PasswordParameterDefinition should serve existing default value in encrypted form.

And strengthen functional tests (using configRoundTrip) to ensure that the same mistake is not made elsewhere.
This commit is contained in:
Jesse Glick committed 2014-02-11 14:19:39 -05:00
1 parent 5548b5220c
commit bf53919856
4 files changed
+54 -1

No files matched your search

+3
View File
@@ -1464,6 +1464,9 @@ public class Functions {
public String getPasswordValue(Object o) {
if (o==null) return null;
if (o instanceof Secret) return ((Secret)o).getEncryptedValue();
if (getIsUnitTest()) {
throw new SecurityException("attempted to render plaintext ‘" + o + "’ in password field; use a getter of type Secret instead");
}
return o.toString();
}