Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [hennagaijin] uploading user db with encrypted passwords

Quote Reply
Re: [hennagaijin] uploading user db with encrypted passwords In reply to
That depends on the way your passwords are encrypted. The following modification might work (if you use MySQL):
Code:
sub auth_valid_user {
# -------------------------------------------------------------------
# This function returns 1 if the user/pass combo is valid, 0/undef
# otherwise.
#
my $args = shift;
my $table = $args->{Table};
return $DB->table($table)->select ( { Username => $args->{Username}, Password => $args->{Password} }, ['Username'] )->rows ||
$DB->table($table)->select ( { Username => $args->{Username}, Password => \"ENCRYPT('$args->{Password}')" }, ['Username'] )->rows
;
}

Note that I didn't test the fix and that is slows down logging in....

Good luck, Jasper

http://www.bookings.org
Subject Author Views Date
Thread uploading user db with encrypted passwords hennagaijin 5852 Dec 11, 2002, 2:58 PM
Thread Re: [hennagaijin] uploading user db with encrypted passwords
jaspercram 5661 Dec 12, 2002, 11:59 PM
Thread Re: [jaspercram] uploading user db with encrypted passwords
hennagaijin 5680 Dec 13, 2002, 4:42 AM
Thread Re: [hennagaijin] uploading user db with encrypted passwords
jaspercram 5690 Dec 13, 2002, 5:01 AM
Post Re: [jaspercram] uploading user db with encrypted passwords
hennagaijin 5667 Dec 14, 2002, 5:37 AM
Thread Re: [jaspercram] uploading user db with encrypted passwords
hennagaijin 5634 Dec 16, 2002, 6:24 AM
Thread Re: [hennagaijin] uploading user db with encrypted passwords
hennagaijin 5605 Dec 18, 2002, 6:53 AM
Thread Re: [hennagaijin] uploading user db with encrypted passwords
hennagaijin 5630 Dec 18, 2002, 7:13 AM
Post Re: [hennagaijin] uploading user db with encrypted passwords
jaspercram 5599 Dec 18, 2002, 7:35 AM