提交 66b9d9ba 编写于 作者: K kohsuke

fixed a possible security issue (SECURITY-3)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32394 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f756ddae
...@@ -120,6 +120,7 @@ public final class ProxyConfiguration implements Saveable { ...@@ -120,6 +120,7 @@ public final class ProxyConfiguration implements Saveable {
Authenticator.setDefault(new Authenticator() { Authenticator.setDefault(new Authenticator() {
@Override @Override
public PasswordAuthentication getPasswordAuthentication() { public PasswordAuthentication getPasswordAuthentication() {
if (getRequestorType()!=RequestorType.PROXY) return null;
ProxyConfiguration p = Hudson.getInstance().proxy; ProxyConfiguration p = Hudson.getInstance().proxy;
return new PasswordAuthentication(p.getUserName(), return new PasswordAuthentication(p.getUserName(),
p.getPassword().toCharArray()); p.getPassword().toCharArray());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册