Skip to content

Commit

Permalink
[JENKINS-12607] canonicalize the name.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Apr 26, 2012
1 parent d7e0749 commit 8b4c00a
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -263,6 +263,11 @@ public UserDetails retrieveUser(String username, String password, String domainN
if (dn==null)
throw new AuthenticationServiceException("No distinguished name for "+username);

// Canonicalize the uesr name. AD user names are case insensitive, so you can login to Administrator as ADMINISTRATOR
String canonicalId = (String)user.get("cn").get();
if (canonicalId!=null) // shouldn't happen but let's be defensive
id = canonicalId;

if (bindName!=null && password!=NO_AUTHENTICATION) {
// if we've used the credential specifically for the bind, we
// need to verify the provided password to do authentication
Expand Down

0 comments on commit 8b4c00a

Please sign in to comment.