mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Increase min password length to 12
This commit is contained in:
parent
da17fb63f3
commit
4d470ce230
@ -102,7 +102,7 @@ class RegisterForm(FlaskForm):
|
||||
Regexp("^[a-zA-Z0-9._-]+$", message=lazy_gettext(
|
||||
"Only alphabetic letters (A-Za-z), numbers (0-9), underscores (_), minuses (-), and periods (.) allowed"))])
|
||||
email = StringField(lazy_gettext("Email"), [InputRequired(), Email()])
|
||||
password = PasswordField(lazy_gettext("Password"), [InputRequired(), Length(6, 100)])
|
||||
password = PasswordField(lazy_gettext("Password"), [InputRequired(), Length(12, 100)])
|
||||
question = StringField(lazy_gettext("What is the result of the above calculation?"), [InputRequired()])
|
||||
agree = BooleanField(lazy_gettext("I agree"), [DataRequired()])
|
||||
submit = SubmitField(lazy_gettext("Register"))
|
||||
@ -220,16 +220,16 @@ def forgot_password():
|
||||
|
||||
class SetPasswordForm(FlaskForm):
|
||||
email = StringField(lazy_gettext("Email"), [Optional(), Email()])
|
||||
password = PasswordField(lazy_gettext("New password"), [InputRequired(), Length(8, 100)])
|
||||
password2 = PasswordField(lazy_gettext("Verify password"), [InputRequired(), Length(8, 100),
|
||||
password = PasswordField(lazy_gettext("New password"), [InputRequired(), Length(12, 100)])
|
||||
password2 = PasswordField(lazy_gettext("Verify password"), [InputRequired(), Length(12, 100),
|
||||
EqualTo('password', message=lazy_gettext('Passwords must match'))])
|
||||
submit = SubmitField(lazy_gettext("Save"))
|
||||
|
||||
|
||||
class ChangePasswordForm(FlaskForm):
|
||||
old_password = PasswordField(lazy_gettext("Old password"), [InputRequired(), Length(8, 100)])
|
||||
password = PasswordField(lazy_gettext("New password"), [InputRequired(), Length(8, 100)])
|
||||
password2 = PasswordField(lazy_gettext("Verify password"), [InputRequired(), Length(8, 100),
|
||||
old_password = PasswordField(lazy_gettext("Old password"), [InputRequired(), Length(6, 100)])
|
||||
password = PasswordField(lazy_gettext("New password"), [InputRequired(), Length(12, 100)])
|
||||
password2 = PasswordField(lazy_gettext("Verify password"), [InputRequired(), Length(12, 100),
|
||||
validators.EqualTo('password', message=lazy_gettext('Passwords must match'))])
|
||||
submit = SubmitField(lazy_gettext("Save"))
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
{{ render_field(form.old_password, tabindex=230) }}
|
||||
{% endif %}
|
||||
|
||||
{{ render_field(form.password, tabindex=230, hint=_("Must be at least 8 characters long.")) }}
|
||||
{{ render_field(form.password, tabindex=230, hint=_("Must be at least 12 characters long.")) }}
|
||||
{{ render_field(form.password2, tabindex=240) }}
|
||||
|
||||
{{ render_submit_field(form.submit, tabindex=280) }}
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
{{ render_field(form.username, tabindex=110, label_visible=False, placeholder=_("Username or email")) }}
|
||||
{{ render_field(form.password, tabindex=120, label_visible=False, placeholder=_("Password")) }}
|
||||
<div class="row mb-3">
|
||||
{{ render_checkbox_field(form.remember_me, tabindex=130, class_="col-sm") }}
|
||||
<a class="col-sm" href="{{ url_for('users.forgot_password') }}">
|
||||
<div class="d-flex gap-2 mb-4">
|
||||
{{ render_checkbox_field(form.remember_me, tabindex=130, class_="flex-grow-1") }}
|
||||
<a class="flex-grow-1" href="{{ url_for('users.forgot_password') }}">
|
||||
{{ _("Forgot my password") }}
|
||||
</a>
|
||||
</div>
|
||||
{{ render_submit_field(form.submit, tabindex=140, class_="btn btn-lg btn-primary d-block") }}
|
||||
{{ render_submit_field(form.submit, tabindex=140, class_="btn btn-lg btn-primary d-block w-100") }}
|
||||
|
||||
<hr class="my-5" />
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
hint=_("Your email is needed to recover your account if you forget your password and to send (configurable) notifications. ") +
|
||||
_("Your email will never be shared with a third-party.")) }}
|
||||
|
||||
{{ render_field(form.password, hint=_("Must be at least 8 characters long.")) }}
|
||||
{{ render_field(form.password, hint=_("Must be at least 12 characters long.")) }}
|
||||
|
||||
<p>
|
||||
<img src="/static/puzzle.png" />
|
||||
|
Loading…
Reference in New Issue
Block a user