master
Aevann1 2021-12-21 21:48:39 +02:00
parent ac406b46ca
commit 4702f65abe
1 changed files with 2 additions and 1 deletions

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=" +