Update modules/database/sql_db.py
Browse files
modules/database/sql_db.py
CHANGED
@@ -40,6 +40,10 @@ def create_user(username, password, role, additional_info=None):
|
|
40 |
return False
|
41 |
|
42 |
try:
|
|
|
|
|
|
|
|
|
43 |
user_data = {
|
44 |
'id': username,
|
45 |
'password': password,
|
|
|
40 |
return False
|
41 |
|
42 |
try:
|
43 |
+
# Generar salt y hash de la contraseña
|
44 |
+
salt = bcrypt.gensalt()
|
45 |
+
hashed = bcrypt.hashpw(password.encode('utf-8'), salt)
|
46 |
+
|
47 |
user_data = {
|
48 |
'id': username,
|
49 |
'password': password,
|