Commit f187fdb2 authored by git's avatar git Committed by aohrvetpv
Browse files

Issue #2402299 by Charles Belov: Improve definitions of policy settings

parent 4d41a2be
Loading
Loading
Loading
Loading
+2 −2
Changes for plugins/constraint/alpha_case.inc: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -20,11 +20,11 @@ $plugin = array(
function password_policy_alpha_case_admin_form($form, &$form_state, $constraint) {
  $sub_form['alpha_case_fieldset'] = array(
    '#type' => 'fieldset',
    '#title' => t('Case sensitivity'),
    '#title' => t('Mixed case'),
  );
  $sub_form['alpha_case_fieldset']['alpha_case'] = array(
    '#type' => 'checkbox',
    '#title' => t('Case Sensitive'),
    '#title' => t('Mixed Case'),
    '#default_value' => $constraint->config['alpha_case'],
    '#description' => t('Password will require upper and lower case letters.'),
  );
+12 −1
Changes for plugins/constraint/drupal_strength.inc: 12 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -26,7 +26,18 @@ function password_policy_drupal_strength_admin_form($form, &$form_state, $constr
    '#type' => 'textfield',
    '#title' => t('Drupal strength level'),
    '#default_value' => $constraint->config['drupal_strength'],
    '#description' => t('Password will be required to have match this level or higher. 0 - 100'),
    '#description' => t('<p>Password will be required to have match this level or higher. 0 - 100</p>
<p>Starting from a base of 100 points:</p>
<ul><li>Having only 3 out of 4 of uppercase, lowercase, digit, and symbol loses 12.5 points</li>
<li>Having only 2 out of 4 of uppercase, lowercase, digit, and symbol loses 25 points</li>
<li>Having only 1 out of 4 of uppercase, lowercase, digit, and symbol loses 40 points</li>
<li>Each character fewer than 6 loses 5 points, plus a 30 point penalty for being under 6 characters.</li>
<li>Username used as password without regard to case gets exactly 5 points</li></ul>
<p>For example:</p>
<ul><li>Aa1! is worth 100 - 10 - 30 = 60 points</li>
<li>ABCDefgh is worth 100 - 25 = 75 points</li>
<li>ABcd12#$ is worth 100 points</li>
<li>jsmith23 and JSmith23 are each worth 5 points for user jsmith23 but 75 or 87.5 points respectively for user rlee98</li></ul>'),
  );

  return $sub_form;