Skip to content

Commit

Permalink
remove duplication; comment out the length_check password_verify rule…
Browse files Browse the repository at this point in the history
… as we already have /.{5}/
  • Loading branch information
DavidGoodwin committed Jan 27, 2021
1 parent e3269b6 commit 97ae019
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,7 @@ function language_hook($PALANG, $language) {
'/([0-9].*){2}/' => 'password_no_digits 2', # must contain at least 2 digits

/* support a 'callable' value which if it returns a non-empty string will be assumed to have failed, non-empty string should be a PALANG key */
'length_check' => function($password) { if (strlen(trim($password)) < 3) { return 'password_too_short'; } }, // not unicode safe.

/**
* 'any-key' => function($password) {
* if ( rand(0, 5) == 0 ) { return 'password_too_short'; }
* // add some remote api check here ... or whatever
* },
*/
// 'length_check' => function($password) { if (strlen(trim($password)) < 3) { return 'password_too_short'; } },
);

// Generate Password
Expand Down

0 comments on commit 97ae019

Please sign in to comment.