From 5181479ad7296114291a6c4ae6d9cb9c7f79b94c Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 30 Mar 2010 23:10:15 +0000 Subject: [PATCH] Relaxed the LDAP search a bit so that it also matches the 'cn' and 'mail' attributes. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29615 71c3de6d-444a-0410-be80-ed276b4c234a Originally-Committed-As: ef39c053f73939b89c3b020d21a4ff098ea41fb5 --- core/src/main/java/hudson/security/LDAPSecurityRealm.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/hudson/security/LDAPSecurityRealm.java b/core/src/main/java/hudson/security/LDAPSecurityRealm.java index d38bfee..9bc009d 100644 --- a/core/src/main/java/hudson/security/LDAPSecurityRealm.java +++ b/core/src/main/java/hudson/security/LDAPSecurityRealm.java @@ -226,9 +226,9 @@ public class LDAPSecurityRealm extends SecurityRealm { /** * Query to locate an entry that identifies the user, given the user name string. * - * Normally "uid={0}" + * Normally something like "uid={0}" * - * @see FilterBasedLdapUserSearch + * @see FilterBasedLdapUserSearch#searchFilter */ public final String userSearch; @@ -282,7 +282,7 @@ public class LDAPSecurityRealm extends SecurityRealm { this.rootDN = rootDN.trim(); this.userSearchBase = fixNull(userSearchBase).trim(); userSearch = fixEmptyAndTrim(userSearch); - this.userSearch = userSearch!=null ? userSearch : "uid={0}"; + this.userSearch = userSearch!=null ? userSearch : "(| (uid={0}) (mail={0}) (cn={0}))"; this.groupSearchBase = fixEmptyAndTrim(groupSearchBase); }