Update for forum_password_verify()

This commit is contained in:
Visman 2023-05-24 23:25:41 +07:00
parent ee1b47343d
commit 22d21f6276
2 changed files with 2 additions and 2 deletions

View file

@ -2290,7 +2290,7 @@ function forum_password_verify(string $password, $user)
{
global $salt1;
if (empty($user['password']) || ! is_string($user['password']) || ! is_string($password) || pun_strlen($password) > 100000)
if (empty($user['password']) || ! is_string($user['password']) || pun_strlen($password) > 100000)
{
return false;
}

View file

@ -194,7 +194,7 @@ else if ($action === 'change_email')
}
else if (isset($_POST['form_sent']))
{
if (empty($_POST['req_password']) || ! forum_password_verify($_POST['req_password'], $pun_user))
if (! is_string($_POST['req_password'] ?? null) || ! forum_password_verify($_POST['req_password'], $pun_user))
message($lang_profile['Wrong pass']);
// Make sure they got here from the site