1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 16:33:00 +00:00

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

View file

@ -92,7 +92,7 @@ register_module([
// The user wants to log in // The user wants to log in
$user = $_POST["user"]; $user = $_POST["user"];
$pass = $_POST["pass"]; $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 // Success! :D