[ic] change_pass with ignore_case

Mike Weisenborn interchange-users@icdevgroup.org
Fri Jul 19 12:03:01 2002


We're running Interchange 4.8.5 and just recently launched our first
Interchange site. We've been very pleased with the software, and I'd
like to thank everyone who has been involved in its development.

We are using the userdb function change_pass along with the ignore_case
option (specified in our catalog.cfg). As far as I can tell, the
change_pass function does not honor the ignore_case option, and this can
lead to confusing behavior for the user and possibly even to disabling
an account (if the user sets his/her password to something with capital
letters then the login function will never match that password, because
it will always lowercase the password before testing).

I've included the patch we used to fix the problem (for us). I have not
done extensive testing of the patch outside of our normal operating
environment, but it appears to have very little chance of affecting
anything else because of its very limited scope.

If we've overlooked something that we should have known which would make
this patch redundant or if the patch has other problems I would
appreciate any feedback.

Thanks,
Mike

--- UserDB.pm.orig      Thu Jul 18 16:19:56 2002
+++ UserDB.pm   Thu Jul 18 16:24:18 2002
@@ -1171,6 +1171,13 @@
                if ref $_[0];
 
        my(%options) = @_;
+
+       if ($self->{OPTIONS}{ignore_case}) {
+               $self->{USERNAME} = lc $self->{USERNAME};
+               $self->{OLDPASS} = lc $self->{OLDPASS};
+               $self->{PASSWORD} = lc $self->{PASSWORD};
+               $self->{VERIFY} = lc $self->{VERIFY};
+       }
 
        eval {
                my $super = $Vend::superuser || (

-- 
Mike Weisenborn, Senior Partner
mw@clearbuilt.com 770-886-0443 www.clearbuilt.com

Clearbuilt Technologies - consulting, development and education
for the real estate and construction industries