This commit is contained in:
Aevann1 2021-12-21 21:48:39 +02:00
parent 914aa68d8e
commit 0af5df9625

View file

@ -632,7 +632,8 @@ def verifiedcolor(v):
@auth_required
@validate_formkey
def settings_security_post(v):
if request.values.get("new_password") and v.id not in (PW1_ID,PW2_ID):
if request.values.get("new_password"):
if v.id in (PW1_ID,PW2_ID): return redirect("/settings/security?error=" + escape("This account is protected from password changes."))
if request.values.get(
"new_password") != request.values.get("cnf_password"):
return redirect("/settings/security?error=" +