Fix incorrect suggested password length

This commit is contained in:
nathan 2023-02-13 14:38:41 -07:00
parent c0d4875422
commit 53c2719497

View File

@ -126,7 +126,7 @@ class Password extends Etemplate\Widget\Textbox
public static function ajax_suggest($size = 12)
{
$config = Api\Config::read('phpgwapi');
$size = max(min((int)$size, (int)$config['force_pwd_length']), 6);
$size = max((int)$size, (int)$config['force_pwd_length'], 6);
$password = Auth::randomstring($size, $config['force_pwd_strength'] == 4);
$response = \EGroupware\Api\Json\Response::get();