提交 ccb3e4cd 编写于 作者: B bale836 提交者: Oleg Nenashev

[JENKINS-46288] - Fix ProxyConfiguration validation for NTLM authentication (#2984)

/**
     * Constructor.
     * @param userName The user name.  This should not include the domain to authenticate with.
     * For example: "user" is correct whereas "DOMAIN\\user" is not.
     * @param password The password.
     * @param host The host the authentication request is originating from.  Essentially, the
     * computer name for this machine.
     * @param domain The domain to authenticate within.
     */
上级 ea77fdc0
......@@ -396,7 +396,7 @@ public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfi
if (userName.indexOf('\\') >= 0){
final String domain = userName.substring(0, userName.indexOf('\\'));
final String user = userName.substring(userName.indexOf('\\') + 1);
return new NTCredentials(user, Secret.fromString(password).getPlainText(), domain, "");
return new NTCredentials(user, Secret.fromString(password).getPlainText(), "", domain);
} else {
return new UsernamePasswordCredentials(userName, Secret.fromString(password).getPlainText());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册