Whirlpool / PHP
#6

Quote:
Originally Posted by acade
View Post
I'm beginning to make a UCP
From a tutorial created 5 years ago? The 'mysql' module is deprecated. Use either mysqli or PDO.

You should also just check the username/password combination directly. By first checking if the user exists you give a possible attacker useful information. If nothing is found simply return a generic "username and password combination is incorrect" message. Much more secure and less work for you.

i.e.:
PHP Code:
$mysqli->query("SELECT id FROM accounts WHERE Username = '$username' AND Password = '$pass'"); 
Then assign the retrieved 'id' to a session variable so you can use it for further queries.
Reply


Messages In This Thread
Whirlpool / PHP - by acade - 11.01.2015, 01:42
Re: Whirlpool / PHP - by acade - 11.01.2015, 17:07
Re: Whirlpool / PHP - by rickisme - 11.01.2015, 17:16
Re: Whirlpool / PHP - by www - 11.01.2015, 18:39
Re: Whirlpool / PHP - by Ahmad45123 - 11.01.2015, 19:24
Re: Whirlpool / PHP - by Vince - 11.01.2015, 20:12

Forum Jump:


Users browsing this thread: 2 Guest(s)