perf: The maximum length of the randomly generated password is changed to 36

pull/14230/head
feng 2 months ago
parent d09eb3c4fa
commit 920199c6df

@ -10,7 +10,7 @@ from .base import BaseAccountSerializer
class PasswordRulesSerializer(serializers.Serializer):
length = serializers.IntegerField(min_value=8, max_value=30, default=16, label=_('Password length'))
length = serializers.IntegerField(min_value=8, max_value=36, default=16, label=_('Password length'))
lowercase = serializers.BooleanField(default=True, label=_('Lowercase'))
uppercase = serializers.BooleanField(default=True, label=_('Uppercase'))
digit = serializers.BooleanField(default=True, label=_('Digit'))

@ -84,7 +84,7 @@ class ChangeSecretAutomationSerializer(AuthValidateMixin, BaseAutomationSerializ
msg = _("* Please enter the correct password length")
raise serializers.ValidationError(msg)
if length < 6 or length > 30:
if length < 6 or length > 36:
msg = _('* Password length range 6-30 bits')
raise serializers.ValidationError(msg)

Loading…
Cancel
Save