Fix issue #133. Store hash as '*' for external users

Set password to '*' for users created by the create_user method. Should cause an invalid password hash for non local users added to the database
This commit is contained in:
bergzand 2016-09-28 10:50:37 +02:00 committed by GitHub
parent 4f122830bc
commit 28f3dba050

View File

@ -242,6 +242,10 @@ class User(db.Model):
We will create a local user (in DB) in order to manage user We will create a local user (in DB) in order to manage user
profile such as name, roles,... profile such as name, roles,...
""" """
# Set an invalid password hash for non local users
self.password = '*'
db.session.add(self) db.session.add(self)
db.session.commit() db.session.commit()