Revert zxcvbn usage in LSexample to keep PHP5 support

Also add note about LSformRule_zxcvbn requirement of PHP >= 7.
This commit is contained in:
Benjamin Renard 2021-12-16 19:14:20 +01:00
parent db287937b7
commit 5d51114b8d
2 changed files with 14 additions and 3 deletions

View file

@ -8,6 +8,9 @@
la base de l'analyse du mot de passe saisi, des conseils seront donnés à la base de l'analyse du mot de passe saisi, des conseils seront donnés à
l'utilisateur pour le guider dans le choix d'un mot de passe sûre.</para> l'utilisateur pour le guider dans le choix d'un mot de passe sûre.</para>
<warning><simpara>La librairie <literal>ZxcvbnPhp</literal> n'est compatible qu'avec
PHP 7 et supérieur.</simpara></warning>
<variablelist> <variablelist>
<title>Paramètres de configuration</title> <title>Paramètres de configuration</title>

View file

@ -553,10 +553,18 @@ $GLOBALS['LSobjects']['LSpeople'] = array (
'confirmChangeQuestion' => "Do you confirm change of this user's password?", 'confirmChangeQuestion' => "Do you confirm change of this user's password?",
), ),
'check_data' => array( 'check_data' => array(
'zxcvbn' => array( 'password' => array(
'msg' => 'Your password must contain from 8 to 10 characters and contains at least one caracter that match with 3 of this types :<ul><li>Uppercase unaccent character</li><li>Lowercase unaccent character</li><li>Digit</li><li>Anything that is not a letter or a digit</li></ul>',
'params' => array( 'params' => array(
'minScore' => 4, 'minLength' => 8,
'userDataAttrs' => array('sn', 'givenName', 'mail'), 'maxLength' => 10,
'regex' => array (
'/[A-Z]/',
'/[a-z]/',
'/[0-9]/',
'/[^A-Za-z0-9]/',
),
'minValidRegex' => 3,
), ),
), ),
), ),