forms: Correct TOTP token minimum value to 0.

A TOTP token value of 000000 is just as likely as any other value.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-10-21 18:45:18 -07:00
committed by Tim Abbott
parent 9de4618202
commit cdf5ff7acd

View File

@@ -635,7 +635,7 @@ class AuthenticationTokenForm(TwoFactorAuthenticationTokenForm):
"""
otp_token = forms.IntegerField(
label=_("Token"), min_value=1, max_value=int("9" * totp_digits()), widget=forms.TextInput
label=_("Token"), min_value=0, max_value=int("9" * totp_digits()), widget=forms.TextInput
)