Skip to content

Commit 8131020

Browse files
CustomerUser: reset token now uses constant-time comparison
1 parent 20f7a58 commit 8131020

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Model/Customer/User/CustomerUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public function setResetPasswordHash($resetPasswordHash): void
456456
#[Override]
457457
public function isResetPasswordHashValid(?string $hash): bool
458458
{
459-
if ($hash === null || $this->resetPasswordHash !== $hash) {
459+
if ($hash === null || $this->resetPasswordHash === null || !hash_equals($this->resetPasswordHash, $hash)) {
460460
return false;
461461
}
462462

0 commit comments

Comments
 (0)