mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +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)
|
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 = \EGroupware\Api\Json\Response::get();
|
||||||
$response->data($password);
|
$response->data($password);
|
||||||
|
Loading…
Reference in New Issue
Block a user