mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 02:43:22 +01:00
Force / respect password requirements set in site configuration when suggesting passwords
This commit is contained in:
parent
4001b3c67f
commit
c0d4875422
@ -125,7 +125,9 @@ class Password extends Etemplate\Widget\Textbox
|
||||
*/
|
||||
public static function ajax_suggest($size = 12)
|
||||
{
|
||||
$password = Auth::randomstring($size, false);
|
||||
$config = Api\Config::read('phpgwapi');
|
||||
$size = max(min((int)$size, (int)$config['force_pwd_length']), 6);
|
||||
$password = Auth::randomstring($size, $config['force_pwd_strength'] == 4);
|
||||
|
||||
$response = \EGroupware\Api\Json\Response::get();
|
||||
$response->data($password);
|
||||
|
Loading…
Reference in New Issue
Block a user