Browse Source

Merge pull request #14230 from jumpserver/pr@dev@max_password_length

perf: The maximum length of the randomly generated password is changed to 36
pull/14232/head
ZhaoJiSen 2 months ago committed by GitHub
parent
commit
fce8cc375f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      apps/accounts/serializers/account/template.py
  2. 2
      apps/accounts/serializers/automations/change_secret.py

2
apps/accounts/serializers/account/template.py

@ -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'))

2
apps/accounts/serializers/automations/change_secret.py

@ -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