mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-07-10 16:06:28 +00:00
#233. Make sure password hash is string before inserting to the db
This commit is contained in:
@ -315,6 +315,7 @@ class User(db.Model):
|
|||||||
self.role_id = Role.query.filter_by(name='Administrator').first().id
|
self.role_id = Role.query.filter_by(name='Administrator').first().id
|
||||||
|
|
||||||
self.password = self.get_hashed_password(self.plain_text_password)
|
self.password = self.get_hashed_password(self.plain_text_password)
|
||||||
|
self.password = self.password.decode("utf-8")
|
||||||
|
|
||||||
db.session.add(self)
|
db.session.add(self)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
Reference in New Issue
Block a user