Make sure the user actually exists before checking their password

This commit is contained in:
Starbeamrainbowlabs 2018-05-13 17:13:25 +01:00
parent 651d456793
commit 5961d11e76
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ register_module([
// The user wants to log in
$user = $_POST["user"];
$pass = $_POST["pass"];
if(verify_password($pass, $settings->users->$user->password))
if(!empty($settings->users->$user) && verify_password($pass, $settings->users->$user->password))
{
// Success! :D