At Laurentian, all usernames will be lowercase
authorDan Scott <dscott@laurentian.ca>
Thu, 11 Sep 2014 01:34:36 +0000 (21:34 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 11 Nov 2014 19:09:56 +0000 (14:09 -0500)
This will prevent mismatches like the user entering "dscott" and the database
having the value "DScott" (in that we're going to force all of the Laurentian
user names in the database to lower case).

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/AuthProxy/LDAP_Auth_OSUL.pm

index 5bf2487..4ddd676 100644 (file)
@@ -12,6 +12,10 @@ my $id_attr = 'uid';
 
 sub authenticate {
     my ( $self, $args ) = @_;
+
+    # Convert the entire user name to lowercase
+    # This assumes that all of the user names in the database are lower case
+    $args->{'username'} = lc($args->{'username'});
     my $username = $args->{'username'};
 
     # Authenticate against LDAP based on the user portion of the email address