Browse Source

Password is not verified when changing password. Fixes #88

sh4nks 10 years ago
parent
commit
c97dc6c6e4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      flaskbb/user/forms.py

+ 4 - 0
flaskbb/user/forms.py

@@ -76,6 +76,10 @@ class ChangePasswordForm(Form):
 
     submit = SubmitField(_("Save"))
 
+    def validate_old_password(self, field):
+        if not current_user.check_password(field.data):
+            raise ValidationError(_("Old Password is wrong."))
+
 
 class ChangeUserDetailsForm(Form):
     # TODO: Better birthday field