Skip to content

Commit

Permalink
perf: The maximum length of the randomly generated password is change…
Browse files Browse the repository at this point in the history
…d to 36
  • Loading branch information
feng626 committed Sep 25, 2024
1 parent d09eb3c commit 920199c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/accounts/serializers/account/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


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'))
Expand Down
2 changes: 1 addition & 1 deletion apps/accounts/serializers/automations/change_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def validate_password_rules(self, password_rules):
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)

Expand Down

0 comments on commit 920199c

Please sign in to comment.