From 5451a442a87fd79fdd23a34c82b296298ddf51bd Mon Sep 17 00:00:00 2001 From: janphilippweinsheimer Date: Fri, 26 Jan 2024 10:40:59 +0100 Subject: [PATCH] passwort field update --- app.py | 4 ++-- templates/profile.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index fa044d5..5db79df 100644 --- a/app.py +++ b/app.py @@ -267,7 +267,7 @@ def profile_change(): newName = request.form.get('newName') newEmail = request.form.get('newEmail') newPassword = request.form.get('newPassword') - oldPassword = request.form.get('oldPassword') + password = request.form.get('password') # Check for errors errors = {} @@ -277,7 +277,7 @@ def profile_change(): if not newEmail: errors['newEmail'] = 'Die E-Mail Adresse ist erforderlich.' - if not oldPassword: + if not password: errors['oldPassword'] = 'Du musst dein aktuelles Passwort angeben.' else: if hashlib.sha256(oldPassword.encode()).hexdigest() != current_user.password: diff --git a/templates/profile.html b/templates/profile.html index 206a599..0c40708 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -31,10 +31,10 @@
- - + +
- {{ errors.get('oldPassword', '') }} + {{ errors.get('password', '') }}