Skip to content

Commit 47d26f1

Browse files
Allow null password hash (#581)
The users password may be null at this point
1 parent 6b1219d commit 47d26f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Http/Middleware/AuthenticateSession.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ protected function storePasswordHashInSession($request, string $guard)
110110
* Validate the password hash against the stored value.
111111
*
112112
* @param \Illuminate\Auth\SessionGuard $guard
113-
* @param string $passwordHash
113+
* @param string|null $passwordHash
114114
* @param string $storedValue
115115
* @return bool
116116
*/
117-
protected function validatePasswordHash(SessionGuard $guard, string $passwordHash, string $storedValue): bool
117+
protected function validatePasswordHash(SessionGuard $guard, ?string $passwordHash, string $storedValue): bool
118118
{
119119
// Try new HMAC format first (Laravel 12.45.0+)...
120120
if (method_exists($guard, 'hashPasswordForCookie')) {

0 commit comments

Comments
 (0)