Differential D8048 Diff 18208 src/applications/auth/controller/PhabricatorAuthRegisterController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthRegisterController.php
| Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | if ($request->isFormPost() || !$can_edit_anything) { | ||||
| } else if ($value_password !== $value_confirm) { | } else if ($value_password !== $value_confirm) { | ||||
| $e_password = pht('No Match'); | $e_password = pht('No Match'); | ||||
| $errors[] = pht('Password and confirmation must match.'); | $errors[] = pht('Password and confirmation must match.'); | ||||
| } else if (strlen($value_password) < $min_len) { | } else if (strlen($value_password) < $min_len) { | ||||
| $e_password = pht('Too Short'); | $e_password = pht('Too Short'); | ||||
| $errors[] = pht( | $errors[] = pht( | ||||
| 'Password is too short (must be at least %d characters long).', | 'Password is too short (must be at least %d characters long).', | ||||
| $min_len); | $min_len); | ||||
| } else if ( | |||||
| PhabricatorCommonPasswords::isCommonPassword($value_password)) { | |||||
| $e_password = pht('Very Weak'); | |||||
| $errors[] = pht( | |||||
| 'Password is pathologically weak. This password is one of the '. | |||||
| 'most common passwords in use, and is extremely easy for '. | |||||
| 'attackers to guess. You must choose a stronger password.'); | |||||
| } else { | } else { | ||||
| $e_password = null; | $e_password = null; | ||||
| } | } | ||||
| } | } | ||||
| if ($can_edit_email) { | if ($can_edit_email) { | ||||
| $value_email = $request->getStr('email'); | $value_email = $request->getStr('email'); | ||||
| if (!strlen($value_email)) { | if (!strlen($value_email)) { | ||||
| ▲ Show 20 Lines • Show All 367 Lines • Show Last 20 Lines | |||||