From cdd4dceb0a08f89f347d8491781ea771b8a02f1d Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Wed, 18 Mar 2020 22:16:00 +0800 Subject: [PATCH] Script.php: we create for backward compatibility. -Hui --- Script.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Script.php b/Script.php index 93ae150..5a84f98 100644 --- a/Script.php +++ b/Script.php @@ -158,7 +158,7 @@ header("Location: index.php"); { while($row = mysqli_fetch_assoc($result)) { // verify the hashed password and unhashed password - $sha512pass = hash('sha512', $password); + $sha512pass = hash('sha512', $password); // for backward compatibility. Old passwords were hashed using SHA512 algorithm. if(password_verify($password, $row["Password"]) or $sha512pass == $row["HashPassword"] or $password == $row["Password"]){ $_SESSION['user_id']=$row['User_ID']; $_SESSION['user_email']=$row['Email'];