From 20dcdbbb665a672d320441a4c5b730e74b33dd76 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Wed, 8 Aug 2018 04:23:20 +0200 Subject: [PATCH] Decode passwords as UTF-8 on profile updates as well Resolves #324 --- app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index f35e9dd..0eff73d 100644 --- a/app/models.py +++ b/app/models.py @@ -339,7 +339,7 @@ class User(db.Model): user.firstname = self.firstname if self.firstname else user.firstname user.lastname = self.lastname if self.lastname else user.lastname 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 if enable_otp is not None: