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; 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;