Skip to content

Commit ed66491

Browse files
committed
Add additional check if password hash is empty in auth process
1 parent 6c529ec commit ed66491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Customer/Model/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function authenticate($customerId, $password)
167167
{
168168
$customerSecure = $this->customerRegistry->retrieveSecureData($customerId);
169169
$hash = $customerSecure->getPasswordHash();
170-
if (!$this->encryptor->validateHash($password, $hash)) {
170+
if (!$hash || !$this->encryptor->validateHash($password, $hash)) {
171171
$this->processAuthenticationFailure($customerId);
172172
if ($this->isLocked($customerId)) {
173173
throw new UserLockedException(__('The account is locked.'));

0 commit comments

Comments
 (0)