Remove password suggestions

It was based on 5 words from a 2048 word list, which is only the same as a 11 character password
This commit is contained in:
rubenwardy 2022-12-15 16:04:02 +00:00
parent a669131178
commit c4ccd82f63
3 changed files with 3 additions and 18 deletions

@ -182,8 +182,7 @@ def register():
if ret: if ret:
return ret return ret
return render_template("users/register.html", form=form, return render_template("users/register.html", form=form)
suggested_password=genphrase(entropy=52, wordset="bip39"))
class ForgotPasswordForm(FlaskForm): class ForgotPasswordForm(FlaskForm):
@ -292,8 +291,7 @@ def change_password():
else: else:
flash(gettext("Old password is incorrect"), "danger") flash(gettext("Old password is incorrect"), "danger")
return render_template("users/change_set_password.html", form=form, return render_template("users/change_set_password.html", form=form)
suggested_password=genphrase(entropy=52, wordset="bip39"))
@bp.route("/user/set-password/", methods=["GET", "POST"]) @bp.route("/user/set-password/", methods=["GET", "POST"])
@ -311,8 +309,7 @@ def set_password():
if ret: if ret:
return ret return ret
return render_template("users/change_set_password.html", form=form, optional=request.args.get("optional"), return render_template("users/change_set_password.html", form=form, optional=request.args.get("optional"))
suggested_password=genphrase(entropy=52, wordset="bip39"))
@bp.route("/user/verify/") @bp.route("/user/verify/")

@ -36,12 +36,6 @@
{{ 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 8 characters long.")) }}
{{ render_field(form.password2, tabindex=240) }} {{ render_field(form.password2, tabindex=240) }}
<p>
{{ _("Password suggestion") }}
(<a href="https://xkcd.com/936/">{{ _("Why?") }}</a>):
<code>{{ suggested_password }}</code>
</p>
{{ render_submit_field(form.submit, tabindex=280) }} {{ render_submit_field(form.submit, tabindex=280) }}
</form> </form>

@ -26,12 +26,6 @@
{{ render_field(form.password, hint=_("Must be at least 8 characters long.")) }} {{ render_field(form.password, hint=_("Must be at least 8 characters long.")) }}
<p>
{{ _("Password suggestion") }}
(<a href="https://xkcd.com/936/">{{ _("Why?") }}</a>):
<code>{{ suggested_password }}</code>
</p>
<p> <p>
<img src="/static/puzzle.png" /> <img src="/static/puzzle.png" />
</p> </p>