mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Fix incorrect suggested password length
This commit is contained in:
parent
ef02c01714
commit
c403edc49a
@ -54,8 +54,11 @@ export class Et2Password extends Et2InvokerMixin(Et2Textbox)
|
|||||||
}
|
}
|
||||||
|
|
||||||
transformAttributes(attrs)
|
transformAttributes(attrs)
|
||||||
|
{
|
||||||
|
if(typeof attrs.suggest !== "undefined")
|
||||||
{
|
{
|
||||||
attrs.suggest = parseInt(attrs.suggest);
|
attrs.suggest = parseInt(attrs.suggest);
|
||||||
|
}
|
||||||
attrs.type = 'password';
|
attrs.type = 'password';
|
||||||
|
|
||||||
if (attrs.viewable)
|
if (attrs.viewable)
|
||||||
|
@ -126,7 +126,7 @@ class Password extends Etemplate\Widget\Textbox
|
|||||||
public static function ajax_suggest($size = 12)
|
public static function ajax_suggest($size = 12)
|
||||||
{
|
{
|
||||||
$config = Api\Config::read('phpgwapi');
|
$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);
|
$password = Auth::randomstring($size, $config['force_pwd_strength'] == 4);
|
||||||
|
|
||||||
$response = \EGroupware\Api\Json\Response::get();
|
$response = \EGroupware\Api\Json\Response::get();
|
||||||
|
Loading…
Reference in New Issue
Block a user