mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Prevent reuse of previous password
git-svn-id: file:///svn/phpbb/trunk@6424 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
c42b75d1bc
commit
fd0b2e7df3
2 changed files with 7 additions and 0 deletions
|
@ -83,6 +83,12 @@ class ucp_profile
|
||||||
$error[] = 'CUR_PASSWORD_ERROR';
|
$error[] = 'CUR_PASSWORD_ERROR';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only check the new password against the previous password if there have been no errors
|
||||||
|
if (!sizeof($error) && $auth->acl_get('u_chgpasswd') && $new_password && md5($new_password) == $user->data['user_password'])
|
||||||
|
{
|
||||||
|
$error[] = 'SAME_PASSWORD_ERROR';
|
||||||
|
}
|
||||||
|
|
||||||
if ($auth->acl_get('u_chgemail') && $email != $user->data['user_email'] && $email_confirm != $email)
|
if ($auth->acl_get('u_chgemail') && $email != $user->data['user_email'] && $email_confirm != $email)
|
||||||
{
|
{
|
||||||
$error[] = 'NEW_EMAIL_ERROR';
|
$error[] = 'NEW_EMAIL_ERROR';
|
||||||
|
|
|
@ -368,6 +368,7 @@ $lang = array_merge($lang, array(
|
||||||
'RULE_DELETED' => 'Rule successfully removed',
|
'RULE_DELETED' => 'Rule successfully removed',
|
||||||
'RULE_NOT_DEFINED' => 'Rule not correctly specified',
|
'RULE_NOT_DEFINED' => 'Rule not correctly specified',
|
||||||
|
|
||||||
|
'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password',
|
||||||
'SEARCH_YOUR_POSTS' => 'Show your posts',
|
'SEARCH_YOUR_POSTS' => 'Show your posts',
|
||||||
'SEND_PASSWORD' => 'Send password',
|
'SEND_PASSWORD' => 'Send password',
|
||||||
'SENT_AT' => 'Sent at',
|
'SENT_AT' => 'Sent at',
|
||||||
|
|
Loading…
Add table
Reference in a new issue