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', '') }}