chg: generatePassword now uses random passwords with a minimum length of 12 characters

pull/1544/head
iglocska 2016-09-18 13:07:16 +02:00
parent 62a2211a23
commit 075056b4f8
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class User extends AppModel {
'ABCDEFGHIJKLOMNOPQRSTUVWXYZ',
'!@#$%^&*()_-'
);
$passwordLength = Configure::read('Security.password_policy_length') ? Configure::read('Security.password_policy_length') : 12;
$passwordLength = (Configure::read('Security.password_policy_length') && Configure::read('Security.password_policy_length') >= 12) ? Configure::read('Security.password_policy_length') : 12;
$pw = '';
for ($i = 0; $i < $passwordLength; $i++) {
$chars = implode('', $groups);