diff options
| author | Graham Eames <grahamje@users.sourceforge.net> | 2006-10-01 16:12:53 +0000 |
|---|---|---|
| committer | Graham Eames <grahamje@users.sourceforge.net> | 2006-10-01 16:12:53 +0000 |
| commit | fd0b2e7df328ad7a7f210b79b2861c8b551ae761 (patch) | |
| tree | 66372a1f7e26513bdc8c3cbb5a24fd05640ca0f2 /phpBB | |
| parent | c42b75d1bc1154c849b5f55becfc42452242c86d (diff) | |
| download | forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.gz forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.bz2 forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.tar.xz forums-fd0b2e7df328ad7a7f210b79b2861c8b551ae761.zip | |
Prevent reuse of previous password
git-svn-id: file:///svn/phpbb/trunk@6424 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 6 | ||||
| -rw-r--r-- | phpBB/language/en/ucp.php | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index e9ef944986..15c7699253 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -83,6 +83,12 @@ class ucp_profile $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) { $error[] = 'NEW_EMAIL_ERROR'; diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index c5838bd015..af50607972 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -368,6 +368,7 @@ $lang = array_merge($lang, array( 'RULE_DELETED' => 'Rule successfully removed', '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', 'SEND_PASSWORD' => 'Send password', 'SENT_AT' => 'Sent at', |
