Added salting and no similar username

This commit is contained in:
Joey Lai
2017-01-18 14:46:32 +01:00
parent afcd048260
commit 0808d46d9e
4 changed files with 22 additions and 14 deletions

View File

@@ -21,14 +21,16 @@
}
else {
$uname=$_POST["uname"];
$uname=strtolower($_POST["uname"]);
$psw=$_POST["psw"];
$hash=hashPassword()["password"];
$userid=hashPassword()["userID"];
// If there's an account, go to the profile page
if(password_verify($psw, $hash)) {
if(password_verify($psw.$uname, $hash)) {
$_SESSION["userID"] = $userid;
header("location: /profile.php");
header("location: myhyvesbookplus.nl/profile.php");
} else {
$loginErr = "Inloggegevens zijn niet correct";
}