Item11052: Case insensitive LDAP logins

pencil
Priority: Enhancement
Current State: Duplicate
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: LdapContrib
Branches:
Reported By: MartinKaufmann
Waiting For:
Last Change By: MichaelDaum
With LdapContrib v4.30 I can no longer log in using an uppercase version of my login and the user mapping doesn't work as well. Both used to work in older version of LdapContrib. In Question895 it was suggested to introduce a new setting {LoginCase} = 'upper|lower|default' to control the behaviour.

-- MartinKaufmann - 18 Aug 2011

As a quick hack I re-introduced the lc from v3.1.1 -> patch

-- MartinKaufmann - 18 Aug 2011

Perhaps a better answer, or at least a more consistent one, would be to allow mapping for the login name, the same as there is today for wiki name and group name. Then I could do
{
  '^(.*)$' => '\L$1\E'
}
To convert to lower case

-- DougClaar - 07 Jan 2012

-- BertoldAltaner - 27 Jan 2012

Problem ist still present in LdapContrib 4.33

-- BertoldAltaner - 27 Jan 2012

I applied the patch provided by MartinKaufmann to LdapContrib 4.33 and then deleted the old ldap cache, restarted apache (since I'm using fastcgi) and then rebuilt the cache. At first I thought the patch worked as case-insensitive login was allowed. However, I soon discovered that other problems arose. Group membership was not recognized and LdapNgPlugin queries did not work. This occurred regarding of what case I used for login.

-- LynnwoodBrown - 24 Feb 2012

I'm using the proposed patch sucessfully against our AD for user authentication with a small additional modification in LdapApacheLogin.pm:
diff LdapApacheLogin.pm.orig LdapApacheLogin.pm
60a61,62
>   $authUser = lc($authUser);
We are not using any AD groups.

-- FrankHoellering - 18 Apr 2012

I spent some time trying to figure out how the code actually performs the authentication, and ended up with this patch, which seems to do the trick very nicely. I have not tested this with group membership, because I'm not using that feature, but it really shouldn't break LdapNgPlugin or anything like that; it very carefully only applies the case-insensitivity to logins.

Oh, as a bonus, it also fixes WikiWord login, which was also broken for me previously. (Sorry to address two issues in one patch, but it was so trivial it felt petty to split it.)

-- PaulDann - 18 Jun 2012

Fixed as part of Item11803

-- MichaelDaum - 26 Jun 2012
 

ItemTemplate edit

Summary Case insensitive LDAP logins
ReportedBy MartinKaufmann
Codebase 1.1.3
SVN Range
AppliesTo Extension
Component LdapContrib
Priority Enhancement
CurrentState Duplicate
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
I Attachment Action Size Date Who Comment
case-insensitive.patchpatch case-insensitive.patch manage 1 K 18 Jun 2012 - 13:32 PaulDann  
patchEXT patch manage 1016 bytes 18 Aug 2011 - 12:25 MartinKaufmann  
Topic revision: r7 - 26 Jun 2012, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy