Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: login page

by mikeB (Friar)
on Dec 19, 2006 at 15:28 UTC ( #590683=note: print w/replies, xml ) Need Help??

in reply to Re: login page
in thread login page

Along the same lines, it's a bit of a security risk to store cleartext passwords in the database. Better to store a hash or encrypted version of the password. Check out the MD5 and Crypt:: family of modules on CPAN. You might also want to consider letting the database do the matching work with something along the lines of:
my $user_info = $dbh->selectrow_hashref(q/
   select <some fields> 
   from users 
   where id = ? and password = ?
/,undef, $id, $password);

if (defined $user_info) {
   # valid user
} else {
   # handle a bad one here

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://590683]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2022-01-20 00:14 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.