mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
[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.
*/
This commit is contained in:
1 parent
ea77fdc0c5
commit
ccb3e4cd50
1 file changed
+1
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user