From 52bb2b220880dd57de6b8f3b1c8793cb9f7ef12c Mon Sep 17 00:00:00 2001 From: Khanh Ngo Date: Fri, 25 Dec 2015 11:23:52 +0700 Subject: [PATCH] Fixing bug in checking user password in Default Aunthentication method --- app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index 9471d85..8904680 100644 --- a/app/models.py +++ b/app/models.py @@ -134,7 +134,7 @@ class User(db.Model): user_info = User.query.filter(User.username == self.username).first() if user_info: - if self.check_password(user_info.password): + if user_info.password and self.check_password(user_info.password): logging.info('User "%s" logged in successfully' % self.username) return True else: