Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/panel/DiffusionSetPasswordPanel.php
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
| if ($new_password !== $confirm) { | if ($new_password !== $confirm) { | ||||
| $e_password = pht('Does Not Match'); | $e_password = pht('Does Not Match'); | ||||
| $e_confirm = pht('Does Not Match'); | $e_confirm = pht('Does Not Match'); | ||||
| $errors[] = pht('Password and confirmation do not match.'); | $errors[] = pht('Password and confirmation do not match.'); | ||||
| } else if ($user->comparePassword($envelope)) { | } else if ($user->comparePassword($envelope)) { | ||||
| $e_password = pht('Not Unique'); | $e_password = pht('Not Unique'); | ||||
| $e_confirm = pht('Not Unique'); | $e_confirm = pht('Not Unique'); | ||||
| $errors[] = pht( | $errors[] = pht( | ||||
| 'This password is not unique. You must use a unique password.'); | 'This password is the same as another password associated '. | ||||
epriestley: A couple of users have been vaguely confused by this, I attempted to reword for clarity. | |||||
| 'with your account. You must use a unique password for '. | |||||
| 'VCS access.'); | |||||
| } else if ( | |||||
| PhabricatorCommonPasswords::isCommonPassword($new_password)) { | |||||
| $e_password = pht('Very Weak'); | |||||
| $e_confirm = pht('Very Weak'); | |||||
| $errors[] = pht( | |||||
| 'This password is extremely weak: it is one of the most common '. | |||||
| 'passwords in use. Choose a stronger password.'); | |||||
| } | } | ||||
| if (!$errors) { | if (!$errors) { | ||||
| $vcspassword->setPassword($envelope, $user); | $vcspassword->setPassword($envelope, $user); | ||||
| $vcspassword->save(); | $vcspassword->save(); | ||||
| return id(new AphrontRedirectResponse())->setURI($panel_uri); | return id(new AphrontRedirectResponse())->setURI($panel_uri); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines | |||||
A couple of users have been vaguely confused by this, I attempted to reword for clarity.