From d10133e116aaf90136b946bee88648611df56aad Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 13 Feb 2024 17:21:02 +0100 Subject: [PATCH] #12864 fixed deprecated --- pandora_console/include/auth/mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index a3c6bcc092..149621081f 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -172,12 +172,12 @@ function process_user_login_local($login, $pass, $api=false, $passAlreadyEncrypt $credentials_check = $pass === $row['password']; } else { // Perform password check whether it is MD5-hashed (old hashing) or Bcrypt-hashed. - if (strlen($row['password']) === 32) { + if (strlen(($row['password'] ?? '')) === 32) { // MD5. $credentials_check = $row !== false && $row['password'] !== md5('') && $row['password'] == md5($pass); } else { // Bcrypt. - $credentials_check = password_verify($pass, $row['password']); + $credentials_check = password_verify($pass, ($row['password'] ?? '')); } }