Skip to content

Commit 536d9bf

Browse files
author
Oleksandr Dubovyk
committed
MC-29789: Insecure Session Handling
- fixed static
1 parent 1ec0862 commit 536d9bf

File tree

1 file changed

+38
-25
lines changed

1 file changed

+38
-25
lines changed

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

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,92 +68,104 @@ class AccountManagement implements AccountManagementInterface
6868
/**
6969
* Configuration paths for create account email template
7070
*
71-
* @deprecated
71+
* @deprecated Get rid of Helpers in Password Security Management
72+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
7273
*/
7374
const XML_PATH_REGISTER_EMAIL_TEMPLATE = 'customer/create_account/email_template';
7475

7576
/**
7677
* Configuration paths for register no password email template
7778
*
78-
* @deprecated
79+
* @deprecated Get rid of Helpers in Password Security Management
80+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
7981
*/
8082
const XML_PATH_REGISTER_NO_PASSWORD_EMAIL_TEMPLATE = 'customer/create_account/email_no_password_template';
8183

8284
/**
8385
* Configuration paths for remind email identity
8486
*
85-
* @deprecated
87+
* @deprecated Get rid of Helpers in Password Security Management
88+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
8689
*/
8790
const XML_PATH_REGISTER_EMAIL_IDENTITY = 'customer/create_account/email_identity';
8891

8992
/**
9093
* Configuration paths for remind email template
9194
*
92-
* @deprecated
95+
* @deprecated Get rid of Helpers in Password Security Management
96+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
9397
*/
9498
const XML_PATH_REMIND_EMAIL_TEMPLATE = 'customer/password/remind_email_template';
9599

96100
/**
97101
* Configuration paths for forgot email email template
98102
*
99-
* @deprecated
103+
* @deprecated Get rid of Helpers in Password Security Management
104+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
100105
*/
101106
const XML_PATH_FORGOT_EMAIL_TEMPLATE = 'customer/password/forgot_email_template';
102107

103108
/**
104109
* Configuration paths for forgot email identity
105110
*
106-
* @deprecated
111+
* @deprecated Get rid of Helpers in Password Security Management
112+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
107113
*/
108114
const XML_PATH_FORGOT_EMAIL_IDENTITY = 'customer/password/forgot_email_identity';
109115

110116
/**
111117
* Configuration paths for account confirmation required
112118
*
113-
* @deprecated
119+
* @deprecated Get rid of Helpers in Password Security Management
114120
* @see AccountConfirmation::XML_PATH_IS_CONFIRM
115121
*/
116122
const XML_PATH_IS_CONFIRM = 'customer/create_account/confirm';
117123

118124
/**
119125
* Configuration paths for account confirmation email template
120126
*
121-
* @deprecated
127+
* @deprecated Get rid of Helpers in Password Security Management
128+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
122129
*/
123130
const XML_PATH_CONFIRM_EMAIL_TEMPLATE = 'customer/create_account/email_confirmation_template';
124131

125132
/**
126133
* Configuration paths for confirmation confirmed email template
127134
*
128-
* @deprecated
135+
* @deprecated Get rid of Helpers in Password Security Management
136+
* @see EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
129137
*/
130138
const XML_PATH_CONFIRMED_EMAIL_TEMPLATE = 'customer/create_account/email_confirmed_template';
131139

132140
/**
133141
* Constants for the type of new account email to be sent
134142
*
135-
* @deprecated
143+
* @deprecated Get rid of Helpers in Password Security Management
144+
* @see EmailNotificationInterface::NEW_ACCOUNT_EMAIL_REGISTERED
136145
*/
137146
const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered';
138147

139148
/**
140149
* Welcome email, when password setting is required
141150
*
142-
* @deprecated
151+
* @deprecated Get rid of Helpers in Password Security Management
152+
* @see EmailNotificationInterface::NEW_ACCOUNT_EMAIL_REGISTERED
143153
*/
144154
const NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD = 'registered_no_password';
145155

146156
/**
147157
* Welcome email, when confirmation is enabled
148158
*
149-
* @deprecated
159+
* @deprecated Get rid of Helpers in Password Security Management
160+
* @see EmailNotificationInterface::NEW_ACCOUNT_EMAIL_REGISTERED
150161
*/
151162
const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation';
152163

153164
/**
154165
* Confirmation email, when account is confirmed
155166
*
156-
* @deprecated
167+
* @deprecated Get rid of Helpers in Password Security Management
168+
* @see EmailNotificationInterface::NEW_ACCOUNT_EMAIL_REGISTERED
157169
*/
158170
const NEW_ACCOUNT_EMAIL_CONFIRMED = 'confirmed';
159171

@@ -179,14 +191,15 @@ class AccountManagement implements AccountManagementInterface
179191
/**
180192
* Configuration path to customer reset password email template
181193
*
182-
* @deprecated
194+
* @deprecated Get rid of Helpers in Password Security Management
195+
* @see Magento/Customer/Model/EmailNotification::XML_PATH_REGISTER_EMAIL_TEMPLATE
183196
*/
184197
const XML_PATH_RESET_PASSWORD_TEMPLATE = 'customer/password/reset_password_template';
185198

186199
/**
187200
* Minimum password length
188201
*
189-
* @deprecated
202+
* @deprecated Get rid of Helpers in Password Security Management
190203
*/
191204
const MIN_PASSWORD_LENGTH = 6;
192205

@@ -526,6 +539,7 @@ public function resendConfirmation($email, $websiteId = null, $redirectUrl = '')
526539
// If we are not able to send a new account email, this should be ignored
527540
$this->logger->critical($e);
528541
}
542+
return true;
529543
}
530544

531545
/**
@@ -671,17 +685,16 @@ public function initiatePasswordReset($email, $template, $websiteId = null)
671685
*/
672686
private function handleUnknownTemplate($template)
673687
{
674-
throw new InputException(
675-
__(
676-
'Invalid value of "%value" provided for the %fieldName field. Possible values: %template1 or %template2.',
677-
[
678-
'value' => $template,
679-
'fieldName' => 'template',
680-
'template1' => AccountManagement::EMAIL_REMINDER,
681-
'template2' => AccountManagement::EMAIL_RESET
682-
]
683-
)
688+
$phrase = __(
689+
'Invalid value of "%value" provided for the %fieldName field. Possible values: %template1 or %template2.',
690+
[
691+
'value' => $template,
692+
'fieldName' => 'template',
693+
'template1' => AccountManagement::EMAIL_REMINDER,
694+
'template2' => AccountManagement::EMAIL_RESET
695+
]
684696
);
697+
throw new InputException($phrase);
685698
}
686699

687700
/**

0 commit comments

Comments
 (0)