Skip to content
Permalink
Browse files

[JENKINS-46288] - Fix ProxyConfiguration validation for NTLM authenti…

…cation (#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.
     */
  • Loading branch information...
bale836 authored and oleg-nenashev committed Aug 19, 2017
1 parent ea77fdc commit ccb3e4cd501b14f617979117ea31fc21f07b972b
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/ProxyConfiguration.java
@@ -396,7 +396,7 @@ private Credentials createCredentials(String userName, String password) {
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());
}

0 comments on commit ccb3e4c

Please sign in to comment.
You can’t perform that action at this time.