[System] UserController: Passwords should be strings
* Even the inital dummy password
This commit is contained in:
parent
13e0d60d8e
commit
b46e93fd26
|
@ -179,7 +179,7 @@ def register(data):
|
||||||
user = User(**values)
|
user = User(**values)
|
||||||
set_roles(user, roles)
|
set_roles(user, roles)
|
||||||
|
|
||||||
password = secrets.token_bytes(16)
|
password = secrets.token_urlsafe(16)
|
||||||
current_app.config["FG_AUTH_BACKEND"].create_user(user, password)
|
current_app.config["FG_AUTH_BACKEND"].create_user(user, password)
|
||||||
db.session.add(user)
|
db.session.add(user)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue