[Catalyst-commits] r8379 - in Catalyst-Authentication-Store-LDAP/trunk: . lib/Catalyst/Authentication/Store/LDAP

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Tue Sep 9 22:06:45 BST 2008


Author: karpet
Date: 2008-09-09 22:06:44 +0100 (Tue, 09 Sep 2008)
New Revision: 8379

Modified:
   Catalyst-Authentication-Store-LDAP/trunk/Changes
   Catalyst-Authentication-Store-LDAP/trunk/META.yml
   Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
Log:
fix rt bug 339113

Modified: Catalyst-Authentication-Store-LDAP/trunk/Changes
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/Changes	2008-09-09 20:56:31 UTC (rev 8378)
+++ Catalyst-Authentication-Store-LDAP/trunk/Changes	2008-09-09 21:06:44 UTC (rev 8379)
@@ -1,6 +1,8 @@
 0.1003 xxxx
     - get entries in array context rather than scalar context, 
       allowing for multiple values. patch by scpham.
+    - lc() to compare Net::LDAP results with supplied $id
+      bug reported via RT #39113
 
 
 0.1002  9 July 2008

Modified: Catalyst-Authentication-Store-LDAP/trunk/META.yml
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/META.yml	2008-09-09 20:56:31 UTC (rev 8378)
+++ Catalyst-Authentication-Store-LDAP/trunk/META.yml	2008-09-09 21:06:44 UTC (rev 8379)
@@ -19,4 +19,4 @@
 requires: 
   Catalyst::Plugin::Authentication: 0.10003
   Net::LDAP: 0
-version: 0.1002
+version: 0.1003_01

Modified: Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm	2008-09-09 20:56:31 UTC (rev 8378)
+++ Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm	2008-09-09 21:06:44 UTC (rev 8379)
@@ -314,8 +314,11 @@
 
     # a little extra sanity check with the 'eq' since LDAP already
     # says it matches.
+    # NOTE that Net::LDAP returns exactly what you asked for, but
+    # because LDAP is often case insensitive, FoO can match foo
+    # and so we normalize with lc().
     if ( defined($entry) ) {
-        unless ( $entry->get_value($user_field) eq $id ) {
+        unless ( lc( $entry->get_value($user_field) ) eq lc($id) ) {
             Catalyst::Exception->throw(
                 "LDAP claims '$user_field' equals '$id' but results entry does not match."
             );




More information about the Catalyst-commits mailing list