From 0baed5b44129901d503f5b77b898ef69eb20f1a0 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 18 Nov 2024 09:50:28 -0600 Subject: [PATCH] hash the token going into the cache this is a bugfix for the new password reset cache driver. when translating from the `DatabaseTokenRepository`, I forgot to mimic the behavior of hashing the token going into storage. --- src/Illuminate/Auth/Passwords/CacheTokenRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Auth/Passwords/CacheTokenRepository.php b/src/Illuminate/Auth/Passwords/CacheTokenRepository.php index 8a2ec3de665..4fb7c67ae16 100644 --- a/src/Illuminate/Auth/Passwords/CacheTokenRepository.php +++ b/src/Illuminate/Auth/Passwords/CacheTokenRepository.php @@ -42,7 +42,7 @@ public function create(CanResetPasswordContract $user) $this->cache->put( $this->prefix.$user->getEmailForPasswordReset(), - [$token, Carbon::now()->format($this->format)], + [$this->hasher->make($token), Carbon::now()->format($this->format)], $this->expires, );