Skip to content

Commit 40df8e3

Browse files
committed
MC-31435: PHPSessionId should changed after logout
1 parent 94f59ea commit 40df8e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,6 @@ public function resetPassword($email, $resetToken, $newPassword)
720720
$newPassword
721721
);
722722
$this->checkPasswordStrength($newPassword);
723-
$this->sessionManager->regenerateId();
724723
//Update secure data
725724
$customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
726725
$customerSecure->setRpToken(null);
@@ -1047,7 +1046,6 @@ private function changePasswordForCustomer($customer, $currentPassword, $newPass
10471046
$customerEmail = $customer->getEmail();
10481047
$this->credentialsValidator->checkPasswordDifferentFromEmail($customerEmail, $newPassword);
10491048
$this->checkPasswordStrength($newPassword);
1050-
$this->sessionManager->regenerateId();
10511049
$customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
10521050
$customerSecure->setRpToken(null);
10531051
$customerSecure->setRpTokenCreatedAt(null);
@@ -1632,6 +1630,7 @@ private function getEmailNotification()
16321630
*/
16331631
private function destroyCustomerSessions($customerId)
16341632
{
1633+
$this->sessionManager->regenerateId();
16351634
$sessionLifetime = $this->scopeConfig->getValue(
16361635
\Magento\Framework\Session\Config::XML_PATH_COOKIE_LIFETIME,
16371636
\Magento\Store\Model\ScopeInterface::SCOPE_STORE

0 commit comments

Comments
 (0)