AIdeaText commited on
Commit
50f776f
·
verified ·
1 Parent(s): 10e44cd

Update modules/database/sql_db.py

Browse files
Files changed (1) hide show
  1. modules/database/sql_db.py +4 -0
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,