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