Fixing bug in checking user password in Default Aunthentication method

This commit is contained in:
Khanh Ngo 2015-12-25 11:23:52 +07:00
parent 9d65e2ad17
commit 52bb2b2208

View File

@ -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: