Decode passwords as UTF-8 on profile updates as well

Resolves #324
This commit is contained in:
Dennis Schubert 2018-08-08 04:23:20 +02:00
parent c6bb58cfda
commit 20dcdbbb66
No known key found for this signature in database
GPG Key ID: 5A0304BEA7966D7E

View File

@ -339,7 +339,7 @@ class User(db.Model):
user.firstname = self.firstname if self.firstname else user.firstname user.firstname = self.firstname if self.firstname else user.firstname
user.lastname = self.lastname if self.lastname else user.lastname user.lastname = self.lastname if self.lastname else user.lastname
user.email = self.email if self.email else user.email user.email = self.email if self.email else user.email
user.password = self.get_hashed_password(self.plain_text_password) if self.plain_text_password else user.password user.password = self.get_hashed_password(self.plain_text_password).decode("utf-8") if self.plain_text_password else user.password
user.avatar = self.avatar if self.avatar else user.avatar user.avatar = self.avatar if self.avatar else user.avatar
if enable_otp is not None: if enable_otp is not None: