From d96b3be571814b729f837d7ad24b307edf141280 Mon Sep 17 00:00:00 2001 From: Mohamed Attia <92581654+Speelwolf@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:26:12 +0100 Subject: [PATCH] Update ResetPasswordHelper.php --- src/ResetPasswordHelper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ResetPasswordHelper.php b/src/ResetPasswordHelper.php index bb02f3f..f965b03 100644 --- a/src/ResetPasswordHelper.php +++ b/src/ResetPasswordHelper.php @@ -168,7 +168,9 @@ public function generateFakeResetToken(?int $resetRequestLifetime = null): Reset $generatedAt = ($expiresAt->getTimestamp() - $resetRequestLifetime); - return new ResetPasswordToken('fake-token', $expiresAt, $generatedAt); + $fakeToken = bin2hex(random_bytes(16)); + + return new ResetPasswordToken($fakeToken, $expiresAt, $generatedAt); } private function findResetPasswordRequest(string $token): ?ResetPasswordRequestInterface