From 7ef6f5db4e1cfbca7cdad769ffda616f85188eba Mon Sep 17 00:00:00 2001 From: Nick Douma Date: Fri, 6 Mar 2020 13:50:04 +0100 Subject: [PATCH] Check if plain_text_password is falsish instead of empty string --- powerdnsadmin/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerdnsadmin/models/user.py b/powerdnsadmin/models/user.py index ce24a75..19ad76f 100644 --- a/powerdnsadmin/models/user.py +++ b/powerdnsadmin/models/user.py @@ -473,7 +473,7 @@ class User(db.Model): user.email = self.email # store new password hash (only if changed) - if self.plain_text_password != "": + if self.plain_text_password: user.password = self.get_hashed_password( self.plain_text_password).decode("utf-8")