From 53c27194972f541e6a220d554a6423a08627a9e6 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 13 Feb 2023 14:38:41 -0700 Subject: [PATCH] Fix incorrect suggested password length --- api/src/Etemplate/Widget/Password.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Password.php b/api/src/Etemplate/Widget/Password.php index 365c76396c..f1cf8a1a02 100644 --- a/api/src/Etemplate/Widget/Password.php +++ b/api/src/Etemplate/Widget/Password.php @@ -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();