Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 ccb3e4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/ProxyConfiguration.java
Expand Up @@ -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());
}
Expand Down

0 comments on commit ccb3e4c

Please sign in to comment.