mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 23:25:52 +00:00
<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:
1 parent
bb55503f81
commit
ad1c0a0b1b
4 files changed
+109
-1
No files matched your search
@@ -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 <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]+://.+");
|
||||
|
||||
|
||||
Reference in new issue
Block a user