Page MenuHomePhabricator

Strengthen password policy: Don't let username and password be the same
Closed, InvalidPublic

Event Timeline

You mean to enable this password policy on fawiki, yes? :P

I think there should be a config variable like:

$wgUserPassNotSame = false;

Obviously defaults to false and we gradually enable it in Wikis (starting with fawiki)

I think there should be a config variable like:

$wgUserPassNotSame = false;

Obviously defaults to false and we gradually enable it in Wikis (starting with fawiki)

$wgPasswordPolicy['policies']['default']['PasswordCannotMatchUsername'] = true;
matmarex subscribed.

This is already enabled by default. Super annoying when you need to register another qwerty/qwerty test user on your test wiki ;)

> reedy@tin:~$ mwscript eval.php fawiki
> var_dump( $wgPasswordPolicy );
array(2) {
  ["policies"]=>
  array(6) {
    ["bureaucrat"]=>
    array(4) {
      ["MinimalPasswordLength"]=>
      int(8)
      ["MinimumPasswordLengthToLogin"]=>
      int(1)
      ["PasswordCannotMatchUsername"]=>
      bool(true)
      ["PasswordCannotBePopular"]=>
      int(10000)
    }
    ["sysop"]=>
    array(4) {
      ["MinimalPasswordLength"]=>
      int(8)
      ["MinimumPasswordLengthToLogin"]=>
      int(1)
      ["PasswordCannotMatchUsername"]=>
      bool(true)
      ["PasswordCannotBePopular"]=>
      int(10000)
    }
    ["bot"]=>
    array(3) {
      ["MinimalPasswordLength"]=>
      int(1)
      ["MinimumPasswordLengthToLogin"]=>
      int(1)
      ["PasswordCannotMatchUsername"]=>
      bool(true)
    }
    ["default"]=>
    array(4) {
      ["MinimalPasswordLength"]=>
      int(1)
      ["PasswordCannotMatchUsername"]=>
      bool(true)
      ["PasswordCannotMatchBlacklist"]=>
      bool(true)
      ["MaximalPasswordLength"]=>
      int(4096)
    }
    ["checkuser"]=>
    array(3) {
      ["MinimalPasswordLength"]=>
      int(8)
      ["MinimumPasswordLengthToLogin"]=>
      int(1)
      ["PasswordCannotBePopular"]=>
      int(10000)
    }
    ["oversight"]=>
    array(3) {
      ["MinimalPasswordLength"]=>
      int(8)
      ["MinimumPasswordLengthToLogin"]=>
      int(1)
      ["PasswordCannotBePopular"]=>
      int(10000)
    }
  }
  ["checks"]=>
  array(6) {
    ["MinimalPasswordLength"]=>
    string(48) "PasswordPolicyChecks::checkMinimalPasswordLength"
    ["MinimumPasswordLengthToLogin"]=>
    string(55) "PasswordPolicyChecks::checkMinimumPasswordLengthToLogin"
    ["PasswordCannotMatchUsername"]=>
    string(54) "PasswordPolicyChecks::checkPasswordCannotMatchUsername"
    ["PasswordCannotMatchBlacklist"]=>
    string(55) "PasswordPolicyChecks::checkPasswordCannotMatchBlacklist"
    ["MaximalPasswordLength"]=>
    string(48) "PasswordPolicyChecks::checkMaximalPasswordLength"
    ["PasswordCannotBePopular"]=>
    string(51) "PasswordPolicyChecks::checkPopularPasswordBlacklist"
  }
}

>
This comment was removed by Reedy.