mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 17:48:56 +01:00
Force / respect password requirements set in site configuration when suggesting passwords
This commit is contained in:
parent
75115d96a9
commit
8764d51701
@ -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