[Catalyst-commits] r14427 - Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Wed Jan 9 14:51:44 GMT 2013


Author: karpet
Date: 2013-01-09 14:51:44 +0000 (Wed, 09 Jan 2013)
New Revision: 14427

Modified:
   Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
Log:
if username is passed to bind, assume password is passed too and do not default to configured password. https://rt.cpan.org/Ticket/Display.html?id=81908

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	2013-01-09 14:49:48 UTC (rev 14426)
+++ Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm	2013-01-09 14:51:44 UTC (rev 14427)
@@ -214,8 +214,14 @@
     if ( !defined($ldap) ) {
         Catalyst::Exception->throw("LDAP Server undefined!");
     }
-    $binddn ||= $self->binddn;
-    $bindpw ||= $self->bindpw;
+
+    # if username is present, make sure password is present too.
+    # see https://rt.cpan.org/Ticket/Display.html?id=81908
+    if ( !defined $binddn ) {
+        $binddn = $self->binddn;
+        $bindpw = $self->bindpw;
+    }
+
     if ( $binddn eq "anonymous" ) {
         $self->_ldap_bind_anon($ldap);
     }




More information about the Catalyst-commits mailing list