1
0
Fork 0
mirror of synced 2024-07-04 06:00:53 +12:00

Add null check to hash

This commit is contained in:
Bradley Schofield 2023-11-07 16:17:14 +00:00
parent 9fc7c1384a
commit 44cbfb2769

View file

@ -44,7 +44,7 @@ class PasswordHistory extends Password
public function isValid($value): bool
{
foreach ($this->history as $hash) {
if (Auth::passwordVerify($value, $hash, $this->algo, $this->algoOptions)) {
if (!empty($hash) && Auth::passwordVerify($value, $hash, $this->algo, $this->algoOptions)) {
return false;
}
}