Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.4
-
Fix Version/s: 1.2.5
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
NT credentials should be in this format:
domain\username
In CommonsHttpMessageSender the getCredentials() method attempts to split the domain from the username using the following code:
int domainIndex = username.indexOf('
');
...
return new NTCredentials(username.substring(0, domainIndex), password,"localhost", username.substring(domainIndex+1));
However, the constructor for NTCredentials is:
NTCredentials(String userName, String password, String host, String domain)
username.substring(0, domainIndex) actually returns the first part of the credentials (the domain) yet it is passed into the contructor as the username.
The correct code is:
return new NTCredentials(username.substring(domainIndex+1), password, "localhost", username.substring(0, domainIndex));
Fixed in svn