X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FStore%2FLDAP%2FBackend.pm;h=915b89d2881e953d1ad79c36c7a9009574e1b1c0;hb=1f800a61d6c9bc955ebf578cd8fbf1059f6896bc;hp=b8977040f4b18588048c78a60b28c3ab499d594b;hpb=ab62b426562470d4ffc97953ad15a3f5fca88008;p=catagits%2FCatalyst-Authentication-Store-LDAP.git diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index b897704..915b89d 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -78,7 +78,7 @@ use base qw( Class::Accessor::Fast ); use strict; use warnings; -our $VERSION = '0.1002'; +our $VERSION = '0.1003'; use Catalyst::Authentication::Store::LDAP::User; use Net::LDAP; @@ -314,8 +314,11 @@ sub lookup_user { # 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." );