From b490cdf124e6d89c2f13912603fc73e8854368b1 Mon Sep 17 00:00:00 2001 From: Joseph Mikel Keller Date: Fri, 14 Apr 2017 19:06:25 +0000 Subject: [PATCH 1/2] database.php edited online with Bitbucket --- www/login_su/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/login_su/database.php b/www/login_su/database.php index 2ddec593..d68aba9c 100644 --- a/www/login_su/database.php +++ b/www/login_su/database.php @@ -48,7 +48,7 @@ function VerifyUser($dataConnection, $username, $password) $statement->bind_result($id, $storedPasshash, $salt); if(!$statement->fetch()) { - throw new Exception(__FUNCTION__ . " failed."); + throw new Exception("Incorrect username."); } $saltedPassword = $password . $salt; @@ -56,7 +56,7 @@ function VerifyUser($dataConnection, $username, $password) if($hashedPassword !== $storedPasshash) { - throw new Exception(__FUNCTION__ . " failed."); + throw new Exception("Incorrect password."); } return $id; From 9513389e0ad99b31beeb48df11ebb438252be359 Mon Sep 17 00:00:00 2001 From: Joseph Mikel Keller Date: Fri, 14 Apr 2017 19:08:08 +0000 Subject: [PATCH 2/2] database.php edited online with Bitbucket --- www/login/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/login/database.php b/www/login/database.php index 79aabc0b..5fc0f306 100644 --- a/www/login/database.php +++ b/www/login/database.php @@ -48,7 +48,7 @@ function VerifyUser($dataConnection, $username, $password) $statement->bind_result($id, $storedPasshash, $salt); if(!$statement->fetch()) { - throw new Exception(__FUNCTION__ . " failed."); + throw new Exception("Incorrect username."); } $saltedPassword = $password . $salt; @@ -56,7 +56,7 @@ function VerifyUser($dataConnection, $username, $password) if($hashedPassword !== $storedPasshash) { - throw new Exception(__FUNCTION__ . " failed."); + throw new Exception("Incorrect password."); } return $id;