From 206e465f9680ef4618009ddfeafa672f8015a511 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 17 Nov 2022 08:34:06 -0600 Subject: [PATCH] formatting --- src/Illuminate/Hashing/AbstractHasher.php | 2 +- src/Illuminate/Hashing/Argon2IdHasher.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Hashing/AbstractHasher.php b/src/Illuminate/Hashing/AbstractHasher.php index e9ab658dab20..f10371290b1d 100644 --- a/src/Illuminate/Hashing/AbstractHasher.php +++ b/src/Illuminate/Hashing/AbstractHasher.php @@ -25,7 +25,7 @@ public function info($hashedValue) */ public function check($value, $hashedValue, array $options = []) { - if (is_null($hashedValue)) { + if (is_null($hashedValue) || strlen($hashedValue) === 0) { return false; } diff --git a/src/Illuminate/Hashing/Argon2IdHasher.php b/src/Illuminate/Hashing/Argon2IdHasher.php index cc7bab3d07b7..9aca47ac9c71 100644 --- a/src/Illuminate/Hashing/Argon2IdHasher.php +++ b/src/Illuminate/Hashing/Argon2IdHasher.php @@ -22,7 +22,7 @@ public function check($value, $hashedValue, array $options = []) throw new RuntimeException('This password does not use the Argon2id algorithm.'); } - if (is_null($hashedValue)) { + if (is_null($hashedValue) || strlen($hashedValue) === 0) { return false; }