mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Add password suggestions to change and set password forms
This commit is contained in:
parent
afb87c525d
commit
7c07ac22ad
@ -228,7 +228,8 @@ def change_password():
|
||||
else:
|
||||
flash("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"])
|
||||
@ -246,7 +247,8 @@ def set_password():
|
||||
if 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/")
|
||||
|
@ -38,6 +38,15 @@
|
||||
{{ render_field(form.password, tabindex=230) }}
|
||||
{{ render_field(form.password2, tabindex=240) }}
|
||||
|
||||
<p>
|
||||
Must be at least 8 characters long.
|
||||
</p>
|
||||
<p>
|
||||
Password suggestion
|
||||
(<a href="https://xkcd.com/936/">Why?</a>):
|
||||
<code>{{ suggested_password }}</code>
|
||||
</p>
|
||||
|
||||
{{ render_submit_field(form.submit, tabindex=280) }}
|
||||
</form>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user