<input type='hidden'> field shouldn't be getting the plain text password value.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32853 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-07-14 00:52:58 +00:00
1 parent bb55503f81
commit ad1c0a0b1b
4 files changed
+109 -1

No files matched your search

+10
View File
@@ -66,6 +66,7 @@ import hudson.util.Area;
import hudson.util.Iterators;
import hudson.scm.SCM;
import hudson.scm.SCMDescriptor;
import hudson.util.Secret;
import org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.JellyTagException;
@@ -1234,6 +1235,15 @@ public class Functions {
}
}
}
/**
* Used by &lt;f:password/> so that we send an encrypted value to the client.
*/
public String getPasswordValue(Object o) {
if (o==null) return null;
if (o instanceof Secret) return ((Secret)o).getEncryptedValue();
return o.toString();
}
private static final Pattern SCHEME = Pattern.compile("[a-z]+://.+");