XFire

NTML authentication credentials reversed

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.4
  • Fix Version/s: 1.2.5
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

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));

Activity

Hide
Tomasz Sztelak added a comment -

Fixed in svn

Show
Tomasz Sztelak added a comment - Fixed in svn

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: