Skip to content

Commit 8421140

Browse files
Merge remote-tracking branch '39570/remove-email-disclosure' into commpr_787643004
2 parents a673224 + ad555c6 commit 8421140

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

‎app/code/Magento/Customer/Controller/Account/Confirmation.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -99,10 +99,7 @@ public function execute()
9999
);
100100
$this->messageManager->addSuccessMessage(__('Please check your email for confirmation key.'));
101101
return $this->getRedirect('*/*/index', ['_secure' => true]);
102-
} catch (InvalidTransitionException $e) {
103-
$this->messageManager->addSuccessMessage(__('This email does not require confirmation.'));
104-
return $this->getRedirect('*/*/index', ['_secure' => true]);
105-
} catch (NoSuchEntityException $e) {
102+
} catch (InvalidTransitionException | NoSuchEntityException $e) {
106103
$this->messageManager->addErrorMessage(__('Wrong email.'));
107104
}
108105
}

‎dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,13 @@ public function testActiveUserConfirmationAction()
254254
);
255255

256256
$this->dispatch('customer/account/confirmation');
257-
$this->assertRedirect($this->stringContains('customer/account/index'));
258257
$this->assertSessionMessages(
259258
$this->equalTo(
260259
[
261-
'This email does not require confirmation.',
260+
'Wrong email.',
262261
]
263262
),
264-
MessageInterface::TYPE_SUCCESS
263+
MessageInterface::TYPE_ERROR
265264
);
266265
}
267266

0 commit comments

Comments
 (0)