Don't force a password reset

main
Florent Daigniere 2 years ago
parent 68bb8da2b7
commit dcf11aea48

@ -64,10 +64,11 @@ def user_edit(user_email):
form.quota_bytes.validators = [ form.quota_bytes.validators = [
wtforms.validators.NumberRange(max=max_quota_bytes)] wtforms.validators.NumberRange(max=max_quota_bytes)]
if form.validate_on_submit(): if form.validate_on_submit():
if msg := utils.isBadOrPwned(form): if form.pw.data:
flask.flash(msg, "error") if msg := utils.isBadOrPwned(form):
return flask.render_template('user/edit.html', form=form, user=user, flask.flash(msg, "error")
domain=user.domain, max_quota_bytes=max_quota_bytes) return flask.render_template('user/edit.html', form=form, user=user,
domain=user.domain, max_quota_bytes=max_quota_bytes)
form.populate_obj(user) form.populate_obj(user)
if form.pw.data: if form.pw.data:
user.set_password(form.pw.data) user.set_password(form.pw.data)

Loading…
Cancel
Save