Skip to content

Commit 9199119

Browse files
author
Stanislav Idolov
committed
MAGETWO-44162: Wrong password validation for Sign In on checkout
1 parent 43b1bd8 commit 9199119

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

app/code/Magento/Customer/Controller/Account/LoginPost.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,12 @@ public function execute()
9292
);
9393
$this->messageManager->addError($message);
9494
$this->session->setUsername($login['username']);
95-
}
96-
catch (AuthenticationException $e) {
95+
} catch (AuthenticationException $e) {
9796
$message = __('Invalid login or password.');
9897
$this->messageManager->addError($message);
9998
$this->session->setUsername($login['username']);
10099
} catch (\Exception $e) {
101-
$this->messageManager->addError(
102-
__('Something went wrong while validating the login and password.')
103-
);
100+
$this->messageManager->addError(__('Invalid login or password.'));
104101
}
105102
} else {
106103
$this->messageManager->addError(__('A login and a password are required.'));

app/code/Magento/Customer/Controller/Ajax/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function execute()
116116
} catch (\Exception $e) {
117117
$response = [
118118
'errors' => true,
119-
'message' => __('Something went wrong while validating the login and password.')
119+
'message' => __('Invalid login or password.')
120120
];
121121
}
122122
/** @var \Magento\Framework\Controller\Result\Json $resultJson */

app/code/Magento/Customer/Test/Unit/Controller/Account/LoginPostTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ protected function mockExceptions($exception, $username)
423423
case '\Exception':
424424
$this->messageManager->expects($this->once())
425425
->method('addError')
426-
->with(__('Something went wrong while validating the login and password.'))
426+
->with(__('Invalid login or password.'))
427427
->willReturnSelf();
428428
break;
429429
}

0 commit comments

Comments
 (0)