Item13810: Local Groups not working on upercase LDAP login

pencil
Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: LdapContrib
Branches:
Reported By: UlrichLeodolter
Waiting For:
Last Change By: UlrichLeodolter
i have installed and configured Foswiki 2.0.2 and everthing works fine including LDAP authentication.

but local (non LDAP) groups and permissions work only if i login with lowercase obvul uid. if i login with OBVUL i don't have access to topics which are allowed in lowercase.

the group topic contains my wikiname, not the uid.
   * GROUP = %USERSWEB%.UlrichLeodolter

$Foswiki::cfg{Ldap}{CaseSensitiveLogin} = 0;

The ldap cache.db contains the following settings (without U2EMAIL and EMAIL2U):

 W2U::UlrichLeodolter
 obvul
 U2W::obvul
 UlrichLeodolter
 DN2U::uid=OBVUL,ou=fe_users,dc=obvsg,dc=at
 obvul
 U2DN::obvul
 uid=OBVUL,ou=fe_users,dc=obvsg,dc=at

-- UlrichLeodolter - 10 Oct 2015

The following patch resolves the problem for me. Now i can login using any case and the non ldap group permissions are applied correctly.

Why was this line commented out?

$ diff -u lib/Foswiki/Users/LdapUserMapping.pm.orig lib/Foswiki/Users/LdapUserMapping.pm
--- lib/Foswiki/Users/LdapUserMapping.pm.orig   2015-09-21 15:46:35.000000000 +0200
+++ lib/Foswiki/Users/LdapUserMapping.pm   2015-11-22 10:47:07.489833994 +0100
@@ -569,7 +569,7 @@
   my $loginName = $this->{ldap}->getLoginOfWikiName($name);
   $name = $loginName if defined $loginName;    # called with a wikiname
 
-  #$name = lc($name) unless $this->{ldap}{caseSensitiveLogin};
+  $name = lc($name) unless $this->{ldap}{caseSensitiveLogin};
   my $cUID = $this->{mapping_id} . _mapLogin2cUID($name);
 
   # don't ask topic user mapping for large wikis

-- UlrichLeodolter - 22 Nov 2015

https://github.com/JackOfMostTrades/LdapContrib/commit/01662a8661175f91c77fd7bd8aa20c99cc27b35b

why is this not in master branch?

-- UlrichLeodolter - 22 Nov 2015
 

ItemTemplate edit

Summary Local Groups not working on upercase LDAP login
ReportedBy UlrichLeodolter
Codebase 2.0.3
SVN Range
AppliesTo Extension
Component LdapContrib
Priority Normal
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r3 - 22 Nov 2015, UlrichLeodolter
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